Add ticketlife, renewlife.
[shishi.git] / lib / crypto-null.c
blobf3542139c4b0f7c873a7e580465a6c7bc0b0927d
1 /* crypto-null.c NULL crypto functions
2 * Copyright (C) 2002, 2003 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Shishi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Shishi; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * Note: This file is #include'd by crypto.c.
24 static int
25 null_encrypt (Shishi * handle,
26 Shishi_key * key,
27 int keyusage,
28 const char *iv, size_t ivlen,
29 const char *in, size_t inlen, char **out, size_t * outlen)
31 *outlen = inlen;
32 *out = xmalloc (*outlen);
33 memcpy (*out, in, inlen);
35 return SHISHI_OK;
38 static int
39 null_decrypt (Shishi * handle,
40 Shishi_key * key,
41 int keyusage,
42 const char *iv, size_t ivlen,
43 const char *in, size_t inlen, char **out, size_t * outlen)
45 *outlen = inlen;
46 *out = xmalloc (*outlen);
47 memcpy (*out, in, inlen);
49 return SHISHI_OK;
52 static int
53 null_random_to_key (Shishi * handle,
54 const char *random, size_t randomlen, Shishi_key * outkey)
56 return SHISHI_OK;
59 static int
60 null_string_to_key (Shishi * handle,
61 const char *password, size_t passwordlen,
62 const char *salt, size_t saltlen,
63 const char *parameter, Shishi_key * outkey)
65 return SHISHI_OK;