hmac: include in re.h
This commit is contained in:
parent
8baae9e564
commit
5cba6b42ec
4 changed files with 4 additions and 3 deletions
|
@ -26,6 +26,7 @@ extern "C" {
|
|||
#include "re_crc32.h"
|
||||
#include "re_dns.h"
|
||||
#include "re_hash.h"
|
||||
#include "re_hmac.h"
|
||||
#include "re_http.h"
|
||||
#include "re_httpauth.h"
|
||||
#include "re_ice.h"
|
||||
|
|
|
@ -14,7 +14,7 @@ void hmac_sha1(const uint8_t *k, /* secret key */
|
|||
|
||||
|
||||
enum hmac_hash {
|
||||
HMAC_SHA1
|
||||
HMAC_HASH_SHA1
|
||||
};
|
||||
|
||||
struct hmac;
|
||||
|
|
|
@ -32,7 +32,7 @@ int hmac_create(struct hmac **hmacp, enum hmac_hash hash,
|
|||
if (!hmacp || !key || !key_len)
|
||||
return EINVAL;
|
||||
|
||||
if (hash != HMAC_SHA1)
|
||||
if (hash != HMAC_HASH_SHA1)
|
||||
return ENOTSUP;
|
||||
|
||||
if (key_len > SHA_DIGEST_LENGTH)
|
||||
|
|
|
@ -32,7 +32,7 @@ int hmac_create(struct hmac **hmacp, enum hmac_hash hash,
|
|||
if (!hmacp || !key || !key_len)
|
||||
return EINVAL;
|
||||
|
||||
if (hash != HMAC_SHA1)
|
||||
if (hash != HMAC_HASH_SHA1)
|
||||
return ENOTSUP;
|
||||
|
||||
hmac = mem_zalloc(sizeof(*hmac), destructor);
|
||||
|
|
Loading…
Add table
Reference in a new issue