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.
25 null_encrypt (Shishi
* handle
,
28 const char *iv
, size_t ivlen
,
29 const char *in
, size_t inlen
, char **out
, size_t * outlen
)
32 *out
= xmalloc (*outlen
);
33 memcpy (*out
, in
, inlen
);
39 null_decrypt (Shishi
* handle
,
42 const char *iv
, size_t ivlen
,
43 const char *in
, size_t inlen
, char **out
, size_t * outlen
)
46 *out
= xmalloc (*outlen
);
47 memcpy (*out
, in
, inlen
);
53 null_random_to_key (Shishi
* handle
,
54 const char *random
, size_t randomlen
, Shishi_key
* outkey
)
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
)