This file implements HMAC-SHA1. More...
#include "jabberdlib.h"Functions | |
| void | hmac_sha1_ascii_r (char const *secret, unsigned char const *message, size_t len, char hmac[41]) |
This file implements HMAC-SHA1.
HMAC-SHA1 is a keyed-hash message authentication code, which can be used to authenticate data. This is used inside jabberd14 to generate dialback keys.
| void hmac_sha1_ascii_r | ( | char const * | secret, | |
| unsigned char const * | message, | |||
| size_t | len, | |||
| char | hmac[41] | |||
| ) |
Calculate the HMAC-SHA1 for a given block of data, the result a string containing the hmac as hex value
| secret | the key to use | |
| message | the message to calculate the HMAC-SHA1 for | |
| len | the length of the message in bytes | |
| hmac | where to place the result |
Referenced by dialback_get_loopcheck_token(), and dialback_merlin().
1.6.1