mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 17:28:17 +00:00
codec_hmac uses hmac key
This commit is contained in:
parent
f003dfad13
commit
3aefd5e5de
@ -288,7 +288,7 @@ static int codec_key_derive(codec_ctx *ctx, cipher_ctx *c_ctx) {
|
||||
static int codec_hmac(cipher_ctx *ctx, Pgno pgno, unsigned char *in, int in_sz, unsigned char *out) {
|
||||
HMAC_CTX hctx;
|
||||
HMAC_CTX_init(&hctx);
|
||||
HMAC_Init_ex(&hctx, ctx->key, ctx->key_sz, EVP_sha1(), NULL);
|
||||
HMAC_Init_ex(&hctx, ctx->hmac_key, ctx->key_sz, EVP_sha1(), NULL);
|
||||
|
||||
/* include the encrypted page data, initialization vector, and page number in HMAC. This will
|
||||
prevent both tampering with the ciphertext, manipulation of the IV, or resequencing otherwise
|
||||
|
Loading…
x
Reference in New Issue
Block a user