Aspects


vs


Hash

A hash function is any well-defined procedure or mathematical function that converts a large amount of data into a small datum, usually a single integer. For questions about the Twitter and Facebook # symbol, use hashtag

Hmac

In cryptography, HMAC (Hash-based Message Authentication Code) is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret key.

Others

Quality Example
Algorithm less susceptible

"The structure of the hmac algorithm makes it less susceptible to attacks on properties of the underlying hash algorithm"

from question "Why does Chrome display a "SHA1" message with a SHA2 certificate"

Much faster

"After looking it s seems that hmac is much faster and better in term of security even if the underlying hash function sha1 is broken which is not the case when using rsa-sha1"

from question "In OAuth: use MAC-SHA1 or RSA-SHA1?"

More efficient

"In some cases on embedded platforms where a fast hash function may not be available these may be more efficient than hmac"

from question "How do you detect that a visitor changed a value in the query string?"

Better

"Hmac is better than a plain hash because it is not vulnerable to hash length extension attacks"

from question "Check if the user changed data"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0