Skip to content

Commit c5360e1

Browse files
Nop for adding random to commoncrypto
1 parent bba319a commit c5360e1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/crypto_cc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
#include <CommonCrypto/CommonCrypto.h>
3737
#include <Security/SecRandom.h>
3838

39+
static int sqlcipher_cc_add_random(void *ctx, void *buffer, int length) {
40+
return SQLITE_OK;
41+
}
42+
3943
/* generate a defined number of random bytes */
4044
static int sqlcipher_cc_random (void *ctx, void *buffer, int length) {
4145
return (SecRandomCopyBytes(kSecRandomDefault, length, (uint8_t *)buffer) == 0) ? SQLITE_OK : SQLITE_ERROR;
@@ -132,6 +136,7 @@ int sqlcipher_cc_setup(sqlcipher_provider *p) {
132136
p->ctx_cmp = sqlcipher_cc_ctx_cmp;
133137
p->ctx_init = sqlcipher_cc_ctx_init;
134138
p->ctx_free = sqlcipher_cc_ctx_free;
139+
p->add_random = sqlcipher_cc_add_random;
135140
return SQLITE_OK;
136141
}
137142

0 commit comments

Comments
 (0)