From 603a78d3503a18dba458a8bc9070a5ba1fd2197f Mon Sep 17 00:00:00 2001 From: wtp <1813748440@qq.com> Date: Fri, 4 Aug 2023 10:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/Services/UserService.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Znyc.Dispatching.Application/User/Services/UserService.cs b/src/Znyc.Dispatching.Application/User/Services/UserService.cs index cf36fa4..87a11d2 100644 --- a/src/Znyc.Dispatching.Application/User/Services/UserService.cs +++ b/src/Znyc.Dispatching.Application/User/Services/UserService.cs @@ -195,15 +195,22 @@ namespace Znyc.Dispatching.Application var key = Convert.FromBase64String(jsCode2JsonResult.session_key);//第一步获取到的session_key var iv = Convert.FromBase64String(input.DecryptPhoneAddInput.Iv); + Console.WriteLine("encryptedData:" + encryptedData); + Console.WriteLine("key:" + key); + Console.WriteLine("iv:" + iv); + var decryptor = rijndael.CreateDecryptor(key, iv); + Console.WriteLine("decryptor:" + decryptor); using (var msDecrypt = new MemoryStream(encryptedData)) { using (var csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)) { + Console.WriteLine("csDecrypt:"+ csDecrypt); using (var srDecrypt = new StreamReader(csDecrypt)) { var plaintext = srDecrypt.ReadToEnd(); var json = Newtonsoft.Json.JsonConvert.DeserializeObject(plaintext); + Console.WriteLine("json:"+json); var phoneNumber = json.phoneNumber; var purePhoneNumber = json.purePhoneNumber;