1 // SPDX-License-Identifier: BSD-2-Clause 2 /* LibTomCrypt, modular cryptographic library -- Tom St Denis 3 * 4 * LibTomCrypt is a library that provides various cryptographic 5 * algorithms in a highly modular and flexible manner. 6 * 7 * The library is free for all purposes without any express 8 * guarantee it works. 9 */ 10 #include "tomcrypt_private.h" 11 12 /** 13 @file f8_done.c 14 F8 implementation, finish chain, Tom St Denis 15 */ 16 17 #ifdef LTC_F8_MODE 18 19 /** Terminate the chain 20 @param f8 The F8 chain to terminate 21 @return CRYPT_OK on success 22 */ f8_done(symmetric_F8 * f8)23int f8_done(symmetric_F8 *f8) 24 { 25 int err; 26 LTC_ARGCHK(f8 != NULL); 27 28 if ((err = cipher_is_valid(f8->cipher)) != CRYPT_OK) { 29 return err; 30 } 31 cipher_descriptor[f8->cipher]->done(&f8->key); 32 return CRYPT_OK; 33 } 34 35 36 37 #endif 38 39 /* ref: $Format:%D$ */ 40 /* git commit: $Format:%H$ */ 41 /* commit time: $Format:%ai$ */ 42