mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 09:18:11 +00:00
sqlcipher_codec_hmac convenience function
This commit is contained in:
parent
c7c5268b5f
commit
8f52dde735
@ -241,6 +241,9 @@ static void sqlcipher_codec_get_pass(codec_ctx *ctx, void **zKey, int *nKey);
|
||||
static void sqlcipher_codec_set_store_pass(codec_ctx *ctx, int value);
|
||||
int sqlcipher_codec_fips_status(codec_ctx *ctx);
|
||||
const char* sqlcipher_codec_get_provider_version(codec_ctx *ctx);
|
||||
int sqlcipher_codec_hmac(const codec_ctx *ctx, const unsigned char *hmac_key, int key_sz,
|
||||
unsigned char* in, int in_sz, unsigned char *in2, int in2_sz,
|
||||
unsigned char *out);
|
||||
#endif
|
||||
#endif
|
||||
/* END SQLCIPHER */
|
||||
|
@ -1249,5 +1249,13 @@ const char* sqlcipher_codec_get_provider_version(codec_ctx *ctx) {
|
||||
return ctx->read_ctx->provider->get_provider_version(ctx->read_ctx);
|
||||
}
|
||||
|
||||
int sqlcipher_codec_hmac(const codec_ctx *ctx, const unsigned char *hmac_key, int key_sz,
|
||||
unsigned char* in, int in_sz, unsigned char *in2, int in2_sz,
|
||||
unsigned char *out) {
|
||||
ctx->read_ctx->provider->hmac(ctx->read_ctx, (unsigned char *)hmac_key, key_sz, in, in_sz, in2, in2_sz, out);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
/* END SQLCIPHER */
|
||||
|
Loading…
x
Reference in New Issue
Block a user