hmacmd5.h File Reference

This is the header file for the HMAC-MD5 keyed hash algorithm described in RFC2104. More...

#include <isc/lang.h>
#include <isc/md5.h>
#include <isc/platform.h>
#include <isc/types.h>

Go to the source code of this file.

Data Structures

struct  isc_hmacmd5_t

Defines

#define ISC_HMACMD5_H   1
#define ISC_HMACMD5_KEYLENGTH   64

Functions

ISC_LANG_BEGINDECLS void isc_hmacmd5_init (isc_hmacmd5_t *ctx, const unsigned char *key, unsigned int len)
void isc_hmacmd5_invalidate (isc_hmacmd5_t *ctx)
void isc_hmacmd5_update (isc_hmacmd5_t *ctx, const unsigned char *buf, unsigned int len)
void isc_hmacmd5_sign (isc_hmacmd5_t *ctx, unsigned char *digest)
isc_boolean_t isc_hmacmd5_verify (isc_hmacmd5_t *ctx, unsigned char *digest)
isc_boolean_t isc_hmacmd5_verify2 (isc_hmacmd5_t *ctx, unsigned char *digest, size_t len)


Detailed Description

This is the header file for the HMAC-MD5 keyed hash algorithm described in RFC2104.

Definition in file hmacmd5.h.


Define Documentation

#define ISC_HMACMD5_H   1

Definition at line 26 of file hmacmd5.h.

#define ISC_HMACMD5_KEYLENGTH   64

Definition at line 33 of file hmacmd5.h.


Function Documentation

ISC_LANG_BEGINDECLS void isc_hmacmd5_init ( isc_hmacmd5_t ctx,
const unsigned char *  key,
unsigned int  len 
)

Start HMAC-MD5 process. Initialize an md5 context and digest the key.

Definition at line 252 of file hmacmd5.c.

References IPAD, isc_md5_final(), isc_md5_init(), isc_md5_update(), isc_hmacmd5_t::key, and isc_hmacmd5_t::md5ctx.

Referenced by ATF_TC_BODY(), hmacmd5_createctx(), sign(), and verify().

void isc_hmacmd5_invalidate ( isc_hmacmd5_t ctx  ) 

Definition at line 275 of file hmacmd5.c.

References isc_md5_invalidate(), isc_hmacmd5_t::key, and isc_hmacmd5_t::md5ctx.

Referenced by hmacmd5_destroyctx(), and isc_hmacmd5_sign().

void isc_hmacmd5_update ( isc_hmacmd5_t ctx,
const unsigned char *  buf,
unsigned int  len 
)

Update context to reflect the concatenation of another buffer full of bytes.

Definition at line 285 of file hmacmd5.c.

References isc_md5_update(), and isc_hmacmd5_t::md5ctx.

Referenced by ATF_TC_BODY(), hmacmd5_adddata(), sign(), and verify().

void isc_hmacmd5_sign ( isc_hmacmd5_t ctx,
unsigned char *  digest 
)

Compute signature - finalize MD5 operation and reapply MD5.

Definition at line 295 of file hmacmd5.c.

References isc_hmacmd5_invalidate(), ISC_MD5_DIGESTLENGTH, isc_md5_final(), isc_md5_init(), isc_md5_update(), isc_hmacmd5_t::key, isc_hmacmd5_t::md5ctx, and OPAD.

Referenced by ATF_TC_BODY(), hmacmd5_sign(), isc_hmacmd5_verify2(), sign(), and verify().

isc_boolean_t isc_hmacmd5_verify ( isc_hmacmd5_t ctx,
unsigned char *  digest 
)

Verify signature - finalize MD5 operation and reapply MD5, then compare to the supplied digest.

Definition at line 319 of file hmacmd5.c.

References isc_hmacmd5_verify2(), and ISC_MD5_DIGESTLENGTH.

isc_boolean_t isc_hmacmd5_verify2 ( isc_hmacmd5_t ctx,
unsigned char *  digest,
size_t  len 
)

Definition at line 324 of file hmacmd5.c.

References isc_hmacmd5_sign(), ISC_MD5_DIGESTLENGTH, isc_safe_memcmp(), and REQUIRE.

Referenced by hmacmd5_verify(), and isc_hmacmd5_verify().


Generated on Tue Apr 28 17:41:15 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha