Files
lightning/libwally-core/src/hmac.h
Rusty Russell 9624a1a10e libwally: fix hmac_sha256 name clash.
This is a workaround; eventually libwally will be a nice shared library that
we won't have to bundle, and clashing with internal symbols won't be
a problem.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-02-21 15:15:28 +10:30

34 lines
933 B
C

#ifndef LIBWALLY_HMAC_H
#define LIBWALLY_HMAC_H
struct sha256;
struct sha512;
/**
* hmac_sha256_internal - Compute an HMAC using SHA-256
*
* @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_sha256_internal(struct sha256 *sha,
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 */