You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
933 B
34 lines
933 B
8 years ago
|
#ifndef LIBWALLY_HMAC_H
|
||
|
#define LIBWALLY_HMAC_H
|
||
|
|
||
|
struct sha256;
|
||
|
struct sha512;
|
||
|
|
||
|
/**
|
||
8 years ago
|
* hmac_sha256_internal - Compute an HMAC using SHA-256
|
||
8 years ago
|
*
|
||
|
* @sha: Destination for the resulting HMAC.
|
||
|
* @key: The key for the hash
|
||
|
* @key_len: The length of @key in bytes.
|
||
|
* @msg: The message to hash
|
||
|
* @msg_len: The length of @msg in bytes.
|
||
|
*/
|
||
8 years ago
|
void hmac_sha256_internal(struct sha256 *sha,
|
||
8 years ago
|
const unsigned char *key, size_t key_len,
|
||
|
const unsigned char *msg, size_t msg_len);
|
||
|
|
||
|
/**
|
||
|
* hmac_sha512 - Compute an HMAC using SHA-512
|
||
|
*
|
||
|
* @sha: Destination for the resulting HMAC.
|
||
|
* @key: The key for the hash
|
||
|
* @key_len: The length of @key in bytes.
|
||
|
* @msg: The message to hash
|
||
|
* @msg_len: The length of @msg in bytes.
|
||
|
*/
|
||
|
void hmac_sha512(struct sha512 *sha,
|
||
|
const unsigned char *key, size_t key_len,
|
||
|
const unsigned char *msg, size_t msg_len);
|
||
|
|
||
|
#endif /* LIBWALLY_HMAC_H */
|