Skip to content

Commit ee14e0f

Browse files
commoncrypto provider name
1 parent fe9cb18 commit ee14e0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/crypto_cc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ static int sqlcipher_cc_random (void *ctx, void *buffer, int length) {
1010
return RAND_bytes((unsigned char *)buffer, length);
1111
}
1212

13+
static const char* sqlcipher_cc_get_provider_name(void *ctx) {
14+
return "commoncrypto";
15+
}
16+
1317
static int sqlcipher_cc_hmac(void *ctx, unsigned char *hmac_key, int key_sz, unsigned char *in, int in_sz, unsigned char *in2, int in2_sz, unsigned char *out) {
1418
CCHmacContext hmac_context;
1519
CCHmacInit(&hmac_context, kCCHmacAlgSHA1, hmac_key, key_sz);
@@ -84,6 +88,7 @@ static int sqlcipher_cc_ctx_free(void **ctx) {
8488

8589
int sqlcipher_cc_setup(sqlcipher_provider *p) {
8690
p->random = sqlcipher_cc_random;
91+
p->get_provider_name = sqlcipher_cc_get_provider_name;
8792
p->hmac = sqlcipher_cc_hmac;
8893
p->kdf = sqlcipher_cc_kdf;
8994
p->cipher = sqlcipher_cc_cipher;

0 commit comments

Comments
 (0)