Root > Reference > All Functions > SHA1HMAC

Function SHA1HMAC

Previous pageReturn to chapter overviewNext page   

Calculates HMAC-SHA1.

 

Unit

EHash

 

Syntax

 

Code (Delphi)

function SHA1HMAC(

const AData: Pointer;

const ADataSize: Cardinal;

const APassword: Pointer;

const APasswordSize: Cardinal

): TSHA1Hash; overload;

 

function SHA1HMAC(

const AData, APassword: RawByteString

): TSHA1Hash; overload;

 

Parameters

AData [in]

A data to calculate value ("text", "message").

 

ADataSize [in]

Size of AData in bytes.

 

APassword [in]

A common shared secret ("password", "key").

 

APasswordSize [in]

Size of APassword in bytes.

 

Return value

SHA1 HMAC value of the specified AData and APassword.

 

Remarks

A Keyed-Hash Message Authentication Code (HMAC) is a specific type of Message Authentication Code (MAC) involving a cryptographic hash function and a secret cryptographic key. It may be used to simultaneously verify both the data integrity and the authentication of a message, as with any MAC.

 

Any cryptographic hash function, such as MD5, SHA-1, or SHA-256, may be used in the calculation of an HMAC; the resulting MAC algorithm is termed HMAC-MD5, HMAC-SHA1, or HMAC-SHA256 accordingly. The cryptographic strength of the HMAC depends upon the cryptographic strength of the underlying hash function, the size of its hash output, and on the size and quality of the key.

 

Important!

SHA-1 is considered insecure against well-funded opponents. It is recommended to use SHA-2 or SHA-3 instead. Microsoft, Google and Mozilla have all announced that their respective browsers will stop accepting SHA-1 SSL certificates by 2017. Windows XP SP2 and earlier, and Android 2.2 and earlier, do not support SHA2 certificates.

 

See also




Send feedback... Build date: 2024-09-30
Last edited: 2024-09-30
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_ehash_sha1hmac.php