]> pd.if.org Git - zpackage/blob - libtomcrypt/src/modes/ofb/ofb_decrypt.c
commit files needed for zpm-fetchurl
[zpackage] / libtomcrypt / src / modes / ofb / ofb_decrypt.c
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
2  *
3  * LibTomCrypt is a library that provides various cryptographic
4  * algorithms in a highly modular and flexible manner.
5  *
6  * The library is free for all purposes without any express
7  * guarantee it works.
8  */
9 #include "tomcrypt.h"
10
11 /**
12   @file ofb_decrypt.c
13   OFB implementation, decrypt data, Tom St Denis
14 */
15
16 #ifdef LTC_OFB_MODE
17
18 /**
19    OFB decrypt
20    @param ct      Ciphertext
21    @param pt      [out] Plaintext
22    @param len     Length of ciphertext (octets)
23    @param ofb     OFB state
24    @return CRYPT_OK if successful
25 */
26 int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb)
27 {
28    LTC_ARGCHK(pt != NULL);
29    LTC_ARGCHK(ct != NULL);
30    LTC_ARGCHK(ofb != NULL);
31    return ofb_encrypt(ct, pt, len, ofb);
32 }
33
34
35 #endif
36
37
38
39 /* ref:         $Format:%D$ */
40 /* git commit:  $Format:%H$ */
41 /* commit time: $Format:%ai$ */