Browse Source

日志提示

master
wtp 2 years ago
parent
commit
603a78d350
  1. 7
      src/Znyc.Dispatching.Application/User/Services/UserService.cs

7
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<dynamic>(plaintext);
Console.WriteLine("json:"+json);
var phoneNumber = json.phoneNumber;
var purePhoneNumber = json.purePhoneNumber;

Loading…
Cancel
Save