MCPcopy Create free account
hub / github.com/ElementsProject/elements / Finalize

Method Finalize

src/crypto/sha256.cpp:732–740  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730//}
731
732void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE])
733{
734 static const unsigned char pad[64] = {0x80};
735 unsigned char sizedesc[8];
736 WriteBE64(sizedesc, bytes << 3);
737 Write(pad, 1 + ((119 - (bytes % 64)) % 64));
738 Write(sizedesc, 8);
739 Midstate(hash, NULL, NULL);
740}
741
742void CSHA256::Midstate(unsigned char hash[OUTPUT_SIZE], uint64_t* len, unsigned char *buffer)
743{

Callers

nothing calls this directly

Calls 1

WriteBE64Function · 0.70

Tested by

no test coverage detected