Root > Reference > All Functions > SHA1Hash

Function SHA1Hash

Previous pageReturn to chapter overviewNext page   

Calculates SHA-1 hash.

 

Unit

EHash

 

Syntax

 

Code (Delphi)

function SHA1Hash(

const AData: Pointer;

const ADataSize: Cardinal

): TSHA1Hash; overload;

 

function SHA1Hash(

const AData: RawByteString

): TSHA1Hash; overload;

 

Parameters

AData [in]

A data to calculate hash.

 

ADataSize [in]

Size of AData in bytes.

 

Return value

SHA-1 hash of the specified AData.

 

Remarks

SHA-1 (Secure Hash Algorithm 1) is a cryptographic hash function. SHA-1 produces a 160-bit (20-byte) hash value known as a message digest. A SHA-1 hash value is typically rendered as a hexadecimal number, 40 digits long.

 

SHA-1 forms part of several widely used security applications and protocols, including TLS and SSL, PGP, SSH, S/MIME, and IPsec. SHA-1 hashing is also used in distributed revision control systems like Git, Mercurial, and Monotone to identify revisions, and to detect data corruption or tampering.

 

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-12-19
Last edited: 2024-12-19
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_sha1hash.php