mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-22 04:21:08 +00:00
Avoid hardcoded lengths. This fixes a bug in the HMAC-SHA224 tests.
This commit is contained in:
parent
30c8e19de7
commit
18650540d8
5 changed files with 10 additions and 5 deletions
|
@ -47,8 +47,9 @@
|
|||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#define HMAC_SHA1_MAC_LEN 20
|
||||
#define HMAC_SHA1_MAC_LEN SHA_DIGEST_LENGTH
|
||||
|
||||
static void
|
||||
t_hmac_sha1_complete(const void *key, size_t keylen,
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#define HMAC_SHA224_MAC_LEN 32
|
||||
#define HMAC_SHA224_MAC_LEN SHA224_DIGEST_LENGTH
|
||||
|
||||
static void
|
||||
t_hmac_sha224_complete(const void *key, size_t keylen,
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#define HMAC_SHA256_MAC_LEN 32
|
||||
#define HMAC_SHA256_MAC_LEN SHA256_DIGEST_LENGTH
|
||||
|
||||
static void
|
||||
t_hmac_sha256_complete(const void *key, size_t keylen,
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#define HMAC_SHA384_MAC_LEN 48
|
||||
#define HMAC_SHA384_MAC_LEN SHA384_DIGEST_LENGTH
|
||||
|
||||
static void
|
||||
t_hmac_sha384_complete(const void *key, size_t keylen,
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#define HMAC_SHA512_MAC_LEN 64
|
||||
#define HMAC_SHA512_MAC_LEN SHA512_DIGEST_LENGTH
|
||||
|
||||
static void
|
||||
t_hmac_sha512_complete(const void *key, size_t keylen,
|
||||
|
|
Loading…
Reference in a new issue