Add FIPS 180-4 SHA-256 #4
Loading…
Reference in a new issue
No description provided.
Delete branch "fputs/sha256"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds FIPS 180-4 SHA-256 in
lfsha256.h. It is not declared fromlfcrypto.horlfpuzzle.h. The hasher does not allocate and returns 32 raw bytes. Hex stays inlfcodec.h.A successful
finalpoisons the context (block_len > 64). Laterupdateorfinalreturns-1untilinit. A NULLoutdoes not finish the context. Bit-length overflow is rejected before the context changes.Tests cover the empty,
abc, 56-byte, and one-million-avectors, including a chunked million-afeed.Tested with
-DCMAKE_BUILD_TYPE=Debug -DFLINT_SANITIZE=ON -DCMAKE_C_EXTENSIONS=OFF.ctest --label-exclude slow: 26/26 passed.6737977bbf252143ac07252143ac07b7f8ee2ff3