SHA3_256ByteArrayRaw
Cryptography
Description
Computes the SHA3-256 digest of a byte array and returns the digest as an AnsiString of 32 raw bytes
SHA3_256ByteArray computes the same digest and returns it as a TPLSHA256Digest fixed array indexed from 0
Syntax
Delphi
Function SHA3_256ByteArrayRaw(Const Input: Array Of Byte): AnsiString;Parameters
| Input | The bytes to hash. The Const modifier passes the open array by reference, so it is neither copied onto the stack nor modified. An empty array is valid and yields the digest of the empty message |
|---|
Return values
| The SHA3-256 digest as 32 raw binary bytes indexed from 1, not hexadecimal text. An empty array returns the digest of the empty message |
Remarks
The input is passed by reference, so large arrays such as page bitmaps are not copied onto the stack
The hash runs through the built-in FIPS 202 Keccak implementation of the digest unit, which also serves the SHA-3 stream functions. Compare two digests by comparing the returned strings directly
Example
Digest:= SHA3_256ByteArrayRaw(Data);See also
SHA3_256ByteArray, SHA256ByteArrayRaw, SHA384ByteArrayRaw, SHA512ByteArrayRaw, SHA3_256ByteArrayRaw, SHA3_384ByteArrayRaw, SHA3_512ByteArrayRaw, SHA3_256StreamRange