ddn.crypto.hash.blake
BLAKE2 and BLAKE3 Hash Implementations.
Types 5
structBlake2bCore
BLAKE2b Core Implementation (Struct for low-level usage).
Fields
ulong[8] hulong[2] tulong[2] fubyte[128] bufsize_t buflensize_t outlenulong[8] IVubyte[16][12] SIGMAclassBlake2bDigest : Hash
structBlake2sCore
Fields
uint[8] huint[2] tuint[2] fubyte[64] bufsize_t buflensize_t outlenuint[8] IVclassBlake2sDigest : Hash
classBlake3Digest : Hash
BLAKE3 Implementation (32-bit words, 256-bit output default).
Uses the same compression function as BLAKE2s but with 7 rounds and fixed IV. Simplified for single-threaded reference (Chunk Loop).
Fields
private uint[8] IVprivate int BLAKE3_ROUNDSprivate ubyte[16][7] SIGMAprivate uint[8][64] _stackprivate ulong _stackLenprivate ubyte[1024] _chunkBufprivate size_t _chunkBufLenprivate ulong _chunkIndexuint FLAG_CHUNK_STARTuint FLAG_CHUNK_ENDuint FLAG_PARENTuint FLAG_ROOTMethods
private
void addChunkCV(uint[8] newCV, ulong totalChunks)void reset()private
void processFullChunk()ubyte[] finish()private
uint[8] compressParent(uint[8] left, uint[8] right, const(uint[8]) key, ulong counter, uint flags)private
uint[8] compressChunk(const(ubyte)[] chunk, ulong counter, uint flags)private
uint[16] compress(uint[8] h, ubyte[64] block, ulong counter, uint blockLen, uint flags)Constructors
this()