File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def get_symmetric_cipher(
41
41
cipher_options : typing .Optional [typing .Dict [str , typing .Optional [SymmetricOptions ]]] = None ,
42
42
) -> BaseSymmetricCipher :
43
43
return ciphers .get_symmetric_cipher (
44
- cipher_type = cipher_type or crypto_settings .ASYMMETRIC_CIPHER_TYPE ,
44
+ cipher_type = cipher_type or crypto_settings .SYMMETRIC_CIPHER_TYPE ,
45
45
common = common ,
46
46
cipher_options = cipher_options ,
47
47
symmetric_cipher_classes = crypto_settings .SYMMETRIC_CIPHER_CLASSES ,
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " bk-crypto-python-sdk"
3
- version = " 1.1.0 "
3
+ version = " 1.1.1 "
4
4
description = " bk-crypto-python-sdk is a lightweight cryptography toolkit for Python applications based on Cryptodome / tongsuopy and other encryption libraries."
5
5
authors = [
" TencentBlueKing <[email protected] >" ]
6
6
readme = " readme.md"
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ assert "123" == symmetric_cipher.decrypt(symmetric_cipher.encrypt("123"))
129
129
``` python
130
130
from bkcrypto import constants
131
131
from bkcrypto.symmetric.options import AESSymmetricOptions, SM4SymmetricOptions
132
- from bkcrypto.asymmetric.options import RSAAsymmetricOptions
132
+ from bkcrypto.asymmetric.options import RSAAsymmetricOptions, SM2AsymmetricOptions
133
133
134
134
BKCRYPTO = {
135
135
# 声明项目所使用的非对称加密算法
@@ -162,9 +162,9 @@ BKCRYPTO = {
162
162
" common" : {" public_key_string" : " your key" },
163
163
" cipher_options" : {
164
164
constants.AsymmetricCipherType.RSA .value: RSAAsymmetricOptions(
165
- padding = constants.RSACipherPadding.PKCS1_OAEP
165
+ padding = constants.RSACipherPadding.PKCS1_v1_5
166
166
),
167
- constants.AsymmetricCipherType.SM2 .value: SM4SymmetricOptions ()
167
+ constants.AsymmetricCipherType.SM2 .value: SM2AsymmetricOptions ()
168
168
},
169
169
},
170
170
}
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ Configure the encryption algorithm type in Django Settings
132
132
``` python
133
133
from bkcrypto import constants
134
134
from bkcrypto.symmetric.options import AESSymmetricOptions, SM4SymmetricOptions
135
- from bkcrypto.asymmetric.options import RSAAsymmetricOptions
135
+ from bkcrypto.asymmetric.options import RSAAsymmetricOptions, SM2AsymmetricOptions
136
136
137
137
BKCRYPTO = {
138
138
# Declare the asymmetric encryption algorithm used by the project
@@ -167,7 +167,7 @@ BKCRYPTO = {
167
167
constants.AsymmetricCipherType.RSA .value: RSAAsymmetricOptions(
168
168
padding = constants.RSACipherPadding.PKCS1_OAEP
169
169
),
170
- constants.AsymmetricCipherType.SM2 .value: SM4SymmetricOptions ()
170
+ constants.AsymmetricCipherType.SM2 .value: SM2AsymmetricOptions ()
171
171
},
172
172
},
173
173
}
Original file line number Diff line number Diff line change 46
46
47
47
* [ Feature ] Add support for non-Django projects ([ #19 ] ( https://github.com/TencentBlueKing/crypto-python-sdk/issues/19 ) )
48
48
* [ Feature ] Add support for prefix ciphertext decryption ([ #20 ] ( https://github.com/TencentBlueKing/crypto-python-sdk/issues/20 ) )
49
+
50
+
51
+ ## 1.1.1 - 2023-08-16
52
+
53
+ ### Fixed
54
+
55
+ * [ Fixed ] Fix the issue of get_symmetric_cipher has wrong default value ([ #25 ] ( https://github.com/TencentBlueKing/crypto-python-sdk/issues/25 ) )
You can’t perform that action at this time.
0 commit comments