adjust return values for commoncrypto

This commit is contained in:
Stephen Lombardo 2013-06-11 12:53:01 -04:00
parent 96055def76
commit b66b1420c3

View File

@ -6,7 +6,7 @@
/* 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);
return (SecRandomCopyBytes(kSecRandomDefault, length, (uint8_t *)buffer) == 0) ? SQLITE_OK : SQLITE_ERROR;
}
static const char* sqlcipher_cc_get_provider_name(void *ctx) {