1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 #include "tomcrypt_private.h"
4 
5 /**
6    @file f8_done.c
7    F8 implementation, finish chain, Tom St Denis
8 */
9 
10 #ifdef LTC_F8_MODE
11 
12 /** Terminate the chain
13   @param f8    The F8 chain to terminate
14   @return CRYPT_OK on success
15 */
f8_done(symmetric_F8 * f8)16 int f8_done(symmetric_F8 *f8)
17 {
18    int err;
19    LTC_ARGCHK(f8 != NULL);
20 
21    if ((err = cipher_is_valid(f8->cipher)) != CRYPT_OK) {
22       return err;
23    }
24    cipher_descriptor[f8->cipher]->done(&f8->key);
25    return CRYPT_OK;
26 }
27 
28 
29 
30 #endif
31