Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/libs/tomcrypt/src/modes/cfb/cfb_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 cfb_done.c
13
CFB implementation, finish chain, Tom St Denis
14
*/
15
16
#ifdef LTC_CFB_MODE
17
18
/** Terminate the chain
19
@param cfb The CFB chain to terminate
20
@return CRYPT_OK on success
21
*/
22
int cfb_done(symmetric_CFB *cfb)
23
{
24
int err;
25
LTC_ARGCHK(cfb != NULL);
26
27
if ((err = cipher_is_valid(cfb->cipher)) != CRYPT_OK) {
28
return err;
29
}
30
cipher_descriptor[cfb->cipher].done(&cfb->key);
31
return CRYPT_OK;
32
}
33
34
35
36
#endif
37
38