X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fnone.c;h=8d475fa0520ebcf2b97a5b24d1ea8e82325ec3cc;hb=9cb3b70fbb028d0bc059a3e5af3c4ea532a2b2f5;hp=d35a85e2273578903f9d5fcd92be49590cec0149;hpb=fb1e58b1bc106212a845da866d0d4e9433c3ae22;p=crypto.git diff --git a/lib/silccrypt/none.c b/lib/silccrypt/none.c index d35a85e2..8d475fa0 100644 --- a/lib/silccrypt/none.c +++ b/lib/silccrypt/none.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 1997 - 2007 Pekka Riikonen + Copyright (C) 1997 - 2008 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ */ -#include "silc.h" +#include "silccrypto.h" #include "none.h" /* @@ -34,19 +34,26 @@ SILC_CIPHER_API_SET_IV(none) } -SILC_CIPHER_API_CONTEXT_LEN(none) +SILC_CIPHER_API_INIT(none) { - return 1; + return (void *)0x01; +} + +SILC_CIPHER_API_UNINIT(none) +{ + } SILC_CIPHER_API_ENCRYPT(none) { - memmove(dst, src, len); + if (src != dst) + memcpy(dst, src, len); return TRUE; } SILC_CIPHER_API_DECRYPT(none) { - memmove(dst, src, len); + if (src != dst) + memcpy(dst, src, len); return TRUE; }