X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fgcrypt%2Fcipher.c;h=e9b32cf7f80fa887031c702c873879fc7c977717;hb=4c819a6e3a59da17142bc7bafd0455ca4bf049ac;hp=cf46dec8220ab320b9553bc20a96c40441297ffe;hpb=40c28589328a2aa96c2ce1419c5d90616c758b3d;p=meshlink diff --git a/src/gcrypt/cipher.c b/src/gcrypt/cipher.c index cf46dec8..e9b32cf7 100644 --- a/src/gcrypt/cipher.c +++ b/src/gcrypt/cipher.c @@ -1,6 +1,6 @@ /* cipher.c -- Symmetric block cipher handling - Copyright (C) 2007 Guus Sliepen + Copyright (C) 2007-2012 Guus Sliepen 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 @@ -212,7 +212,7 @@ bool cipher_encrypt(cipher_t *cipher, const void *indata, size_t inlen, void *ou else pad[i] = padbyte; } - + if(oneshot) gcry_cipher_setiv(cipher->handle, cipher->key + cipher->keylen, cipher->blklen);