mirror of
https://github.com/status-im/go-sqlcipher.git
synced 2026-08-31 02:01:15 +00:00
Also upgrade libtomcrypt to the latest version. Thanks to André Medeiros for preparing the switch to SQLCipher 4.x with https://github.com/mutecomm/go-sqlcipher/pull/9
31 lines
577 B
C
31 lines
577 B
C
/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
|
|
/* SPDX-License-Identifier: Unlicense */
|
|
#include "tomcrypt_private.h"
|
|
|
|
/**
|
|
@file cbc_done.c
|
|
CBC implementation, finish chain, Tom St Denis
|
|
*/
|
|
|
|
#ifdef LTC_CBC_MODE
|
|
|
|
/** Terminate the chain
|
|
@param cbc The CBC chain to terminate
|
|
@return CRYPT_OK on success
|
|
*/
|
|
int cbc_done(symmetric_CBC *cbc)
|
|
{
|
|
int err;
|
|
LTC_ARGCHK(cbc != NULL);
|
|
|
|
if ((err = cipher_is_valid(cbc->cipher)) != CRYPT_OK) {
|
|
return err;
|
|
}
|
|
cipher_descriptor[cbc->cipher].done(&cbc->key);
|
|
return CRYPT_OK;
|
|
}
|
|
|
|
|
|
|
|
#endif
|