summaryrefslogtreecommitdiff
path: root/cipher/cipher.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2013-10-26 14:51:44 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2013-10-26 14:51:44 +0300
commitd9431725952e40f201c7eda000d3c8511ebd5b33 (patch)
tree3218ae8a1f59ce18017450d7223067e0911fb98b /cipher/cipher.c
parent6c6d4810927de7310ae7bac61b4ff5467d7cb485 (diff)
downloadlibgcrypt-d9431725952e40f201c7eda000d3c8511ebd5b33.tar.gz
Drop _gcry_cipher_ofb_decrypt as it duplicates _gcry_cipher_ofb_encrypt
* cipher/cipher.c (cipher_decrypt): Use _gcry_cipher_ofb_encrypt for OFB decryption. * cipher/cipher-internal.h: Remove _gcry_cipher_ofb_decrypt declaration. * cipher/cipher-ofb.c (_gcry_cipher_ofb_decrypt): Remove. (_gcry_cipher_ofb_encrypt): remove copying of IV to lastiv, it's unused there. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r--cipher/cipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c
index c0d1d0be..df6d2025 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -814,7 +814,7 @@ cipher_decrypt (gcry_cipher_hd_t c, byte *outbuf, unsigned int outbuflen,
break;
case GCRY_CIPHER_MODE_OFB:
- rc = _gcry_cipher_ofb_decrypt (c, outbuf, outbuflen, inbuf, inbuflen);
+ rc = _gcry_cipher_ofb_encrypt (c, outbuf, outbuflen, inbuf, inbuflen);
break;
case GCRY_CIPHER_MODE_CTR: