mirror of
https://github.com/pppscn/SmsForwarder
synced 2024-11-04 06:00:11 +00:00
修复:微信小程序端报错“sm4Key must not be null”
This commit is contained in:
parent
f99dc6bbba
commit
91d8910d21
@ -75,7 +75,7 @@ class AppMessageConverter : MessageConverter {
|
|||||||
throw HttpException(500, "服务端未配置SM4密钥")
|
throw HttpException(500, "服务端未配置SM4密钥")
|
||||||
}
|
}
|
||||||
|
|
||||||
val sm4Key = ConvertTools.hexStringToByteArray(HttpServerUtils.clientSignKey.toString())
|
val sm4Key = ConvertTools.hexStringToByteArray(HttpServerUtils.serverSm4Key.toString())
|
||||||
val encryptCBC = ConvertTools.hexStringToByteArray(json)
|
val encryptCBC = ConvertTools.hexStringToByteArray(json)
|
||||||
val decryptCBC = SM4Crypt.decrypt(encryptCBC, sm4Key)
|
val decryptCBC = SM4Crypt.decrypt(encryptCBC, sm4Key)
|
||||||
//json = String(Base64.decode(decryptCBC.toString()))
|
//json = String(Base64.decode(decryptCBC.toString()))
|
||||||
|
Loading…
Reference in New Issue
Block a user