Major restructuring of the internals of SILC Cipher API
[crypto.git] / lib / silccrypt / none.c
1 /*
2
3   none.c
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 1997 - 2008 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 #include "silccrypto.h"
21 #include "none.h"
22
23 /*
24  * SILC Crypto API for None cipher (ie. no cipher) :)
25  */
26
27 SILC_CIPHER_API_SET_KEY(none)
28 {
29   return TRUE;
30 }
31
32 SILC_CIPHER_API_SET_IV(none)
33 {
34
35 }
36
37 SILC_CIPHER_API_INIT(none)
38 {
39   return (void *)0x01;
40 }
41
42 SILC_CIPHER_API_UNINIT(none)
43 {
44
45 }
46
47 SILC_CIPHER_API_ENCRYPT(none)
48 {
49   memmove(dst, src, len);
50   return TRUE;
51 }
52
53 SILC_CIPHER_API_DECRYPT(none)
54 {
55   memmove(dst, src, len);
56   return TRUE;
57 }