SHA512ByteArray

Cryptography

Description

Computes the SHA-512 digest of a byte array and returns it as a fixed-size TPLSHA512Digest value of 64 raw bytes

The hash is produced by the built-in TDCP_sha512 implementation contained in the digest unit, so no CryptoAPI provider is required; an empty array returns the digest of the empty message

Syntax

Delphi

Function SHA512ByteArray(Input: Array Of Byte): TPLSHA512Digest;

Return values

The SHA-512 digest as a TPLSHA512Digest array of 64 raw binary bytes, not hexadecimal text

Remarks

TPLSHA512Digest is declared as Array [0..63] of Byte; the input is hashed in a single update call starting at Input[0], and the 64-bit compression rounds run on the shared SHA-512 base class that also serves SHA-384

Example

Digest:= SHA512ByteArray(Data);

See also

SHA256ByteArray, SHA384ByteArray, SHA3_256ByteArray, SHA3_384ByteArray, SHA3_512ByteArray, SHA1StreamRange, SHA256StreamRange, SHA384StreamRange, SHA512StreamRange, SHA3_256StreamRange, SHA3_384StreamRange, SHA3_512StreamRange, SHAKE256ByteArray, SHAKE256StreamRange