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

Method Finalize

src/crypto/ripemd160.cpp:273–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void CRIPEMD160::Finalize(unsigned char hash[OUTPUT_SIZE])
274{
275 static const unsigned char pad[64] = {0x80};
276 unsigned char sizedesc[8];
277 WriteLE64(sizedesc, bytes << 3);
278 Write(pad, 1 + ((119 - (bytes % 64)) % 64));
279 Write(sizedesc, 8);
280 WriteLE32(hash, s[0]);
281 WriteLE32(hash + 4, s[1]);
282 WriteLE32(hash + 8, s[2]);
283 WriteLE32(hash + 12, s[3]);
284 WriteLE32(hash + 16, s[4]);
285}
286
287CRIPEMD160& CRIPEMD160::Reset()
288{

Callers

nothing calls this directly

Calls 2

WriteLE64Function · 0.85
WriteLE32Function · 0.70

Tested by

no test coverage detected