search for: hmac_h

Displaying 1 result from an estimated 1 matches for "hmac_h".

2012 Sep 04
2
[PATCH] Generalize HMAC implementation
...>hash->result(ctx->ctx, digest); + + ctx->hash->loop(ctx->ctxo, digest, ctx->hash->digest_size); + ctx->hash->result(ctx->ctxo, digest); +} diff --git a/src/lib/hmac.h b/src/lib/hmac.h new file mode 100644 --- /dev/null +++ b/src/lib/hmac.h @@ -0,0 +1,23 @@ +#ifndef HMAC_H +#define HMAC_H + +#include "hash-method.h" +#include "sha1.h" + +struct hmac_context { + void *ctx, *ctxo; + const struct hash_method *hash; +}; + +void hmac_init(struct hmac_context *ctx, const unsigned char *key, + size_t key_len, const struct hash_method *meth); +void hmac_...