cctools
hmac.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2010- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef HMAC_H_
8 #define HMAC_H_
9 
10 #include <stdlib.h>
11 
16 #include "sha1.h"
17 #include "md5.h"
18 
19 
30 int hmac(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char *digest, size_t digest_len, size_t block_size, void (*hash_func) (const void *, size_t, unsigned char *));
31 
40 int hmac_md5(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char digest[MD5_DIGEST_LENGTH]);
41 
50 int hmac_sha1(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char digest[SHA1_DIGEST_LENGTH]);
51 
52 
53 #endif
int hmac_md5(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char digest[MD5_DIGEST_LENGTH])
Generate HMAC using md5 hash function Note that this function produces a digest in binary form which...
int hmac_sha1(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char digest[SHA1_DIGEST_LENGTH])
Generate HMAC using sha1 hash function Note that this function produces a digest in binary form whic...
Routines for computing SHA1 checksums.
Definition: buffer.h:26
int hmac(const void *buffer, size_t buffer_length, const void *key, size_t key_length, unsigned char *digest, size_t digest_len, size_t block_size, void(*hash_func)(const void *, size_t, unsigned char *))
Generate HMAC.
Routines for computing MD5 checksums.