Not all the cryptographic hash functions have the counter parameter for making messages be different for each counter value. But many accept a key parameter.
Is reasonable to use the key parameter as a counter?
Is it safe?
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.
Sign up to join this communityHash functions don't have key as parameter. I assume you got that misconception from programming languages such as PHP where they allow you to set a key to turn them into HMAC, despite they're no longer plain hash anymore.
That counter is part of padding to make the message "Merkle-Damgaard-Compliant", and there are other ways to do that.