Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/tomcrypt/src/modes/f8/f8_done.c
5972 views
1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
2
*
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
5
*
6
* The library is free for all purposes without any express
7
* guarantee it works.
8
*/
9
#include "tomcrypt.h"
10
11
/**
12
@file f8_done.c
13
F8 implementation, finish chain, Tom St Denis
14
*/
15
16
#ifdef LTC_F8_MODE
17
18
/** Terminate the chain
19
@param f8 The F8 chain to terminate
20
@return CRYPT_OK on success
21
*/
22
int f8_done(symmetric_F8 *f8)
23
{
24
int err;
25
LTC_ARGCHK(f8 != NULL);
26
27
if ((err = cipher_is_valid(f8->cipher)) != CRYPT_OK) {
28
return err;
29
}
30
cipher_descriptor[f8->cipher].done(&f8->key);
31
return CRYPT_OK;
32
}
33
34
35
36
#endif
37
38