From 91d8910d216846f035b5512e1fff1618b5a2bade Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Thu, 27 Oct 2022 20:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E6=8A=A5=E9=94=99=E2=80=9C?= =?UTF-8?q?sm4Key=20must=20not=20be=20null=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sms/forwarder/server/component/AppMessageConverter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/idormy/sms/forwarder/server/component/AppMessageConverter.kt b/app/src/main/java/com/idormy/sms/forwarder/server/component/AppMessageConverter.kt index 36c222c4..d6b2e555 100644 --- a/app/src/main/java/com/idormy/sms/forwarder/server/component/AppMessageConverter.kt +++ b/app/src/main/java/com/idormy/sms/forwarder/server/component/AppMessageConverter.kt @@ -75,7 +75,7 @@ class AppMessageConverter : MessageConverter { throw HttpException(500, "服务端未配置SM4密钥") } - val sm4Key = ConvertTools.hexStringToByteArray(HttpServerUtils.clientSignKey.toString()) + val sm4Key = ConvertTools.hexStringToByteArray(HttpServerUtils.serverSm4Key.toString()) val encryptCBC = ConvertTools.hexStringToByteArray(json) val decryptCBC = SM4Crypt.decrypt(encryptCBC, sm4Key) //json = String(Base64.decode(decryptCBC.toString()))