jabberd14 1.6.2
Functions
hmac.cc File Reference

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])

Detailed Description

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.


Function Documentation

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

Parameters:
secretthe key to use
messagethe message to calculate the HMAC-SHA1 for
lenthe length of the message in bytes
hmacwhere to place the result

Referenced by dialback_get_loopcheck_token(), and dialback_merlin().