sha256 - the hash of FIPS 180-4.
sha256 = import("crypto/sha256")sha256.Hex("abc") # ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
sha256.Sum(data) # the same 32 bytes, unencodedIt is written in tau, one 64 byte block at a time, so it is meant for checksums, signatures and tokens rather than for hashing a large file.
¶Size = 32valuesource
Size is how many bytes a digest takes, BlockSize how many bytes go into the compression function at once. HMAC needs both.
¶BlockSize = 64valuesource
¶Kvaluesource
The first 32 bits of the fractional parts of the cube roots of the first 64 primes, which is where the constants of the round function come from.
¶Sum = fn(data)source
Sum returns the 32 bytes of the digest of data, a string or bytes.
¶Hex = fn(data)source
Hex returns the digest of data as the 64 hexadecimal digits it is usually written with.