Path: blob/master/libs/tomcrypt/src/modes/ctr/ctr_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 ctr_decrypt.c12CTR implementation, decrypt data, Tom St Denis13*/1415#ifdef LTC_CTR_MODE1617/**18CTR decrypt19@param ct Ciphertext20@param pt [out] Plaintext21@param len Length of ciphertext (octets)22@param ctr CTR state23@return CRYPT_OK if successful24*/25int ctr_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, symmetric_CTR *ctr)26{27LTC_ARGCHK(pt != NULL);28LTC_ARGCHK(ct != NULL);29LTC_ARGCHK(ctr != NULL);3031return ctr_encrypt(ct, pt, len, ctr);32}3334#endif353637