MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / Final

Method Final

src/cryptlib/sha.cpp:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void SHA::Final(byte *hash)
35{
36 PadLastBlock(56);
37 CorrectEndianess(data, data, 56);
38
39 data[(unsigned int)14] = countHi;
40 data[(unsigned int)15] = countLo;
41
42 Transform(digest, data);
43 CorrectEndianess(digest, digest, DIGESTSIZE);
44 memcpy(hash, digest, DIGESTSIZE);
45
46 Init(); // reinit for next use
47}
48
49
50/* The SHA f()-functions. The f1 and f3 functions can be optimized to

Callers 1

InputFinishedMethod · 0.80

Calls 1

TransformFunction · 0.85

Tested by

no test coverage detected