Fix.
[shishi.git] / lib / crypto-md.c
blob802a0f7e5bbfcae03fd760dd1f4a98c38ce5be7a
1 /* crypto-md.c DES crypto functions
2 * Copyright (C) 2002, 2003 Simon Josefsson
3 * Copyright (C) 2003 Nicolas Pouvesle
5 * This file is part of Shishi.
7 * Shishi is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * Shishi is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Shishi; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "internal.h"
25 #include "crypto.h"
27 static int
28 md4_checksum (Shishi * handle,
29 Shishi_key * key,
30 int keyusage,
31 int cksumtype,
32 const char *in, size_t inlen, char **out, size_t * outlen)
34 if (outlen)
35 *outlen = 16;
36 return shishi_md4 (handle, in, inlen, out);
39 static int
40 md5_checksum (Shishi * handle,
41 Shishi_key * key,
42 int keyusage,
43 int cksumtype,
44 const char *in, size_t inlen, char **out, size_t * outlen)
46 if (outlen)
47 *outlen = 16;
48 return shishi_md5 (handle, in, inlen, out);
51 checksuminfo md4_info = {
52 SHISHI_RSA_MD4,
53 "rsa-md4",
54 16,
55 md4_checksum
58 checksuminfo md5_info = {
59 SHISHI_RSA_MD5,
60 "rsa-md5",
61 16,
62 md5_checksum