Skip to content

Commit ad143de

Browse files
author
sunmh
committed
use sm4-cbc
1 parent 162b061 commit ad143de

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/crypto_cc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int sqlcipher_cc_cipher(void *ctx, int mode, unsigned char *key, int key_
123123
}
124124

125125
static const char* sqlcipher_cc_get_cipher(void *ctx) {
126-
return "aes-256-cbc";
126+
return "sm4-cbc";
127127
}
128128

129129
static int sqlcipher_cc_get_key_sz(void *ctx) {

src/crypto_libtomcrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static int sqlcipher_ltc_kdf(void *ctx, int algorithm, const unsigned char *pass
199199
}
200200

201201
static const char* sqlcipher_ltc_get_cipher(void *ctx) {
202-
return "aes-256-cbc";
202+
return "sm4-cbc";
203203
}
204204

205205
static int sqlcipher_ltc_cipher(void *ctx, int mode, unsigned char *key, int key_sz, unsigned char *iv, unsigned char *in, int in_sz, unsigned char *out) {

src/crypto_openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int sqlcipher_openssl_add_random(void *ctx, void *buffer, int length) {
8585
return SQLITE_OK;
8686
}
8787

88-
#define OPENSSL_CIPHER "aes-256-cbc"
88+
#define OPENSSL_CIPHER "sm4-cbc"
8989

9090

9191
/* activate and initialize sqlcipher. Most importantly, this will automatically

0 commit comments

Comments
 (0)