From c5360e120ea8d801619485b30161eb37fc2ac677 Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Fri, 6 Dec 2013 11:12:48 -0600 Subject: [PATCH] Nop for adding random to commoncrypto --- src/crypto_cc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crypto_cc.c b/src/crypto_cc.c index c994c91..707deca 100644 --- a/src/crypto_cc.c +++ b/src/crypto_cc.c @@ -36,6 +36,10 @@ #include #include +static int sqlcipher_cc_add_random(void *ctx, void *buffer, int length) { + return SQLITE_OK; +} + /* generate a defined number of random bytes */ static int sqlcipher_cc_random (void *ctx, void *buffer, int length) { return (SecRandomCopyBytes(kSecRandomDefault, length, (uint8_t *)buffer) == 0) ? SQLITE_OK : SQLITE_ERROR; @@ -132,6 +136,7 @@ int sqlcipher_cc_setup(sqlcipher_provider *p) { p->ctx_cmp = sqlcipher_cc_ctx_cmp; p->ctx_init = sqlcipher_cc_ctx_init; p->ctx_free = sqlcipher_cc_ctx_free; + p->add_random = sqlcipher_cc_add_random; return SQLITE_OK; }