Path: blob/master/libs/tomcrypt/src/modes/lrw/lrw_done.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 lrw_done.c12LRW_MODE implementation, Free resources, Tom St Denis13*/1415#ifdef LTC_LRW_MODE1617/**18Terminate a LRW state19@param lrw The state to terminate20@return CRYPT_OK if successful21*/22int lrw_done(symmetric_LRW *lrw)23{24int err;2526LTC_ARGCHK(lrw != NULL);2728if ((err = cipher_is_valid(lrw->cipher)) != CRYPT_OK) {29return err;30}31cipher_descriptor[lrw->cipher].done(&lrw->key);3233return CRYPT_OK;34}3536#endif373839