Initial revision
[silc.git] / lib / silccrypt / none.c
1 /*
2
3   none.c
4
5   Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
6
7   Copyright (C) 1997 - 2000 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; either version 2 of the License, or
12   (at your option) any later version.
13   
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License for more details.
18
19 */
20 /*
21  * $Id$
22  * $Log$
23  * Revision 1.1  2000/06/27 11:36:55  priikone
24  * Initial revision
25  *
26  *
27  */
28
29 #include "silcincludes.h"
30 #include "none.h"
31
32 /* 
33  * SILC Crypto API for None cipher (ie. no cipher) :)
34  */
35
36 SILC_CIPHER_API_SET_KEY(none)
37 {
38   return TRUE;
39 }
40
41 SILC_CIPHER_API_SET_KEY_WITH_STRING(none)
42 {
43   return TRUE;
44 }
45
46 SILC_CIPHER_API_CONTEXT_LEN(none)
47 {
48   return 1;
49 }
50
51 SILC_CIPHER_API_ENCRYPT_CBC(none)
52 {
53   memcpy(dst, src, len);
54   return TRUE;
55 }
56
57 SILC_CIPHER_API_DECRYPT_CBC(none)
58 {
59   memcpy(dst, src, len);
60   return TRUE;
61 }