Mercurial > dropbear
comparison libtomcrypt/src/hashes/md2.c @ 1437:871b18fd7065 fuzz
merge from main (libtommath/libtomcrypt/curve25510-donna updates)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 22:51:45 +0800 |
parents | f849a5ca2efc |
children | 6dba84798cd5 |
comparison
equal
deleted
inserted
replaced
1432:41dca1e5ea34 | 1437:871b18fd7065 |
---|---|
4 * algorithms in a highly modular and flexible manner. | 4 * algorithms in a highly modular and flexible manner. |
5 * | 5 * |
6 * The library is free for all purposes without any express | 6 * The library is free for all purposes without any express |
7 * guarantee it works. | 7 * guarantee it works. |
8 * | 8 * |
9 * Tom St Denis, [email protected], http://libtomcrypt.com | 9 * Tom St Denis, [email protected], http://libtom.org |
10 */ | 10 */ |
11 #include "tomcrypt.h" | 11 #include "tomcrypt.h" |
12 | 12 |
13 /** | 13 /** |
14 @param md2.c | 14 @param md2.c |
15 MD2 (RFC 1319) hash function implementation by Tom St Denis | 15 LTC_MD2 (RFC 1319) hash function implementation by Tom St Denis |
16 */ | 16 */ |
17 | 17 |
18 #ifdef MD2 | 18 #ifdef LTC_MD2 |
19 | 19 |
20 const struct ltc_hash_descriptor md2_desc = | 20 const struct ltc_hash_descriptor md2_desc = |
21 { | 21 { |
22 "md2", | 22 "md2", |
23 7, | 23 7, |
100 */ | 100 */ |
101 int md2_init(hash_state *md) | 101 int md2_init(hash_state *md) |
102 { | 102 { |
103 LTC_ARGCHK(md != NULL); | 103 LTC_ARGCHK(md != NULL); |
104 | 104 |
105 /* MD2 uses a zero'ed state... */ | 105 /* LTC_MD2 uses a zero'ed state... */ |
106 zeromem(md->md2.X, sizeof(md->md2.X)); | 106 zeromem(md->md2.X, sizeof(md->md2.X)); |
107 zeromem(md->md2.chksum, sizeof(md->md2.chksum)); | 107 zeromem(md->md2.chksum, sizeof(md->md2.chksum)); |
108 zeromem(md->md2.buf, sizeof(md->md2.buf)); | 108 zeromem(md->md2.buf, sizeof(md->md2.buf)); |
109 md->md2.curlen = 0; | 109 md->md2.curlen = 0; |
110 return CRYPT_OK; | 110 return CRYPT_OK; |
244 } | 244 } |
245 | 245 |
246 #endif | 246 #endif |
247 | 247 |
248 | 248 |
249 /* $Source: /cvs/libtom/libtomcrypt/src/hashes/md2.c,v $ */ | 249 /* $Source$ */ |
250 /* $Revision: 1.8 $ */ | 250 /* $Revision$ */ |
251 /* $Date: 2006/11/01 09:28:17 $ */ | 251 /* $Date$ */ |