10 uint8_t ipad[64], opad[64];
12 memset(ipad, 0,
sizeof(ipad));
20 memcpy(ipad, key, len);
22 memcpy(opad, ipad,
sizeof(opad));
24 for (
int i = 0; i < 64; i++) {
void init()
Initialize a new MD5 digest computation.
void init(const uint8_t *key, size_t len)
Initialize a new MD5 digest computation.
bool equals_hex(const char *expected)
Compare the digest against a provided hex-encoded digest (32 bytes).
void get_bytes(uint8_t *output)
Retrieve the HMAC-MD5 digest as bytes.
void add(const uint8_t *data, size_t len)
Add bytes of data for the digest.
bool equals_bytes(const uint8_t *expected)
Compare the digest against a provided byte-encoded digest (16 bytes).
bool equals_hex(const char *expected)
Compare the digest against a provided hex-encoded digest (32 bytes).
void add(const uint8_t *data, size_t len)
Add bytes of data for the digest.
bool equals_bytes(const uint8_t *expected)
Compare the digest against a provided byte-encoded digest (16 bytes).
void get_bytes(uint8_t *output)
Retrieve the MD5 digest as bytes.
void calculate()
Compute the digest, based on the provided data.
void get_hex(char *output)
Retrieve the MD5 digest as hex characters.
void get_hex(char *output)
Retrieve the HMAC-MD5 digest as hex characters.
Implementation of SPI Controller mode.
void calculate()
Compute the digest, based on the provided data.