1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 #include "tomcrypt_private.h"
4 
5 /**
6   @file ofb_decrypt.c
7   OFB implementation, decrypt data, Tom St Denis
8 */
9 
10 #ifdef LTC_OFB_MODE
11 
12 /**
13    OFB decrypt
14    @param ct      Ciphertext
15    @param pt      [out] Plaintext
16    @param len     Length of ciphertext (octets)
17    @param ofb     OFB state
18    @return CRYPT_OK if successful
19 */
ofb_decrypt(const unsigned char * ct,unsigned char * pt,unsigned long len,symmetric_OFB * ofb)20 int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb)
21 {
22    LTC_ARGCHK(pt != NULL);
23    LTC_ARGCHK(ct != NULL);
24    LTC_ARGCHK(ofb != NULL);
25    return ofb_encrypt(ct, pt, len, ofb);
26 }
27 
28 
29 #endif
30 
31 
32