Computes and returns the digest.
72 {
74
77
78
79 unsigned int bufferIndex = (
unsigned int)(this->byteCount & 0x3F);
80 unsigned int paddingLength = (bufferIndex < 56) ? (56 - bufferIndex) : (120 - bufferIndex);
81 static const uint8_t PADDING[64] = {
82 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
83 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
84 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
85 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
86 };
87 (void)this->
write(PADDING, paddingLength);
88
89
90 (void)this->
write(bits, 8);
91
92
94
95#if defined(SK_MD5_CLEAR_DATA)
96
97 memset(this, 0, sizeof(*this));
98#endif
99 return digest;
100}
static void encode(uint8_t output[16], const uint32_t input[4])
bool write(const void *buffer, size_t size) final