diff options
author | djm <> | 2010-10-01 22:54:21 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:54:21 +0000 |
commit | 2ea67f4aa254b09ded62e6e14fc893bbe6381579 (patch) | |
tree | bb3923b81f2ce34b1ad62684afdf1a94d904c185 /src/lib/libcrypto/evp/m_wp.c | |
parent | 6ddfb710ab14b10183ff3a6a32f643554c80065e (diff) | |
parent | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (diff) | |
download | openbsd-2ea67f4aa254b09ded62e6e14fc893bbe6381579.tar.gz openbsd-2ea67f4aa254b09ded62e6e14fc893bbe6381579.tar.bz2 openbsd-2ea67f4aa254b09ded62e6e14fc893bbe6381579.zip |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/evp/m_wp.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_wp.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c new file mode 100644 index 0000000000..1ce47c040b --- /dev/null +++ b/src/lib/libcrypto/evp/m_wp.c | |||
@@ -0,0 +1,42 @@ | |||
1 | /* crypto/evp/m_wp.c */ | ||
2 | |||
3 | #include <stdio.h> | ||
4 | #include "cryptlib.h" | ||
5 | |||
6 | #ifndef OPENSSL_NO_WHIRLPOOL | ||
7 | |||
8 | #include <openssl/evp.h> | ||
9 | #include <openssl/objects.h> | ||
10 | #include <openssl/x509.h> | ||
11 | #include <openssl/whrlpool.h> | ||
12 | |||
13 | static int init(EVP_MD_CTX *ctx) | ||
14 | { return WHIRLPOOL_Init(ctx->md_data); } | ||
15 | |||
16 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | ||
17 | { return WHIRLPOOL_Update(ctx->md_data,data,count); } | ||
18 | |||
19 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
20 | { return WHIRLPOOL_Final(md,ctx->md_data); } | ||
21 | |||
22 | static const EVP_MD whirlpool_md= | ||
23 | { | ||
24 | NID_whirlpool, | ||
25 | 0, | ||
26 | WHIRLPOOL_DIGEST_LENGTH, | ||
27 | 0, | ||
28 | init, | ||
29 | update, | ||
30 | final, | ||
31 | NULL, | ||
32 | NULL, | ||
33 | EVP_PKEY_NULL_method, | ||
34 | WHIRLPOOL_BBLOCK/8, | ||
35 | sizeof(EVP_MD *)+sizeof(WHIRLPOOL_CTX), | ||
36 | }; | ||
37 | |||
38 | const EVP_MD *EVP_whirlpool(void) | ||
39 | { | ||
40 | return(&whirlpool_md); | ||
41 | } | ||
42 | #endif | ||