Path: blob/master/libs/tomcrypt/src/modes/ofb/ofb_decrypt.c
5972 views
/* LibTomCrypt, modular cryptographic library -- Tom St Denis1*2* LibTomCrypt is a library that provides various cryptographic3* algorithms in a highly modular and flexible manner.4*5* The library is free for all purposes without any express6* guarantee it works.7*/8#include "tomcrypt.h"910/**11@file ofb_decrypt.c12OFB implementation, decrypt data, Tom St Denis13*/1415#ifdef LTC_OFB_MODE1617/**18OFB decrypt19@param ct Ciphertext20@param pt [out] Plaintext21@param len Length of ciphertext (octets)22@param ofb OFB state23@return CRYPT_OK if successful24*/25int ofb_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_OFB *ofb)26{27LTC_ARGCHK(pt != NULL);28LTC_ARGCHK(ct != NULL);29LTC_ARGCHK(ofb != NULL);30return ofb_encrypt(ct, pt, len, ofb);31}323334#endif353637