3 #include "internal/cryptlib.h"
5 #ifndef OPENSSL_NO_WHIRLPOOL
7 # include <openssl/evp.h>
8 # include <openssl/objects.h>
9 # include <openssl/x509.h>
10 # include <openssl/whrlpool.h>
11 # include "internal/evp_int.h"
13 static int init(EVP_MD_CTX *ctx)
15 return WHIRLPOOL_Init(EVP_MD_CTX_md_data(ctx));
18 static int update(EVP_MD_CTX *ctx, const void *data, size_t count)
20 return WHIRLPOOL_Update(EVP_MD_CTX_md_data(ctx), data, count);
23 static int final(EVP_MD_CTX *ctx, unsigned char *md)
25 return WHIRLPOOL_Final(md, EVP_MD_CTX_md_data(ctx));
28 static const EVP_MD whirlpool_md = {
31 WHIRLPOOL_DIGEST_LENGTH,
39 sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX),
42 const EVP_MD *EVP_whirlpool(void)
44 return (&whirlpool_md);