update 修改加密方式
和其他
This commit is contained in:
@@ -97,8 +97,9 @@ namespace Ewide.NbzsZheliban.Service
|
||||
/// </summary>
|
||||
/// <param name="cardno"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<List<Dcbs>> GetzzDcbsAsync(string cardno)
|
||||
private async Task<List<Dcbs>> GetzzDcbsAsync(string _cardno)
|
||||
{
|
||||
var cardno = MD5Encryption.Encrypt(_cardno);
|
||||
var list = _cache.Get<List<Dcbs>>("CacheData-InvestigateTable");
|
||||
if (list != null && list.Count > 0)
|
||||
return list.Where(p => p.ExpropriatedCardNo == cardno).ToList();
|
||||
@@ -111,8 +112,9 @@ namespace Ewide.NbzsZheliban.Service
|
||||
/// </summary>
|
||||
/// <param name="cardno"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<List<Dcbs>> GetfzzDcbsAsync(string cardno)
|
||||
private async Task<List<Dcbs>> GetfzzDcbsAsync(string _cardno)
|
||||
{
|
||||
var cardno = MD5Encryption.Encrypt(_cardno);
|
||||
var list = _cache.Get<List<Dcbs>>("CacheData-NonResidentialInvestigateTable");
|
||||
if (list != null && list.Count > 0)
|
||||
return list.Where(p => p.ExpropriatedCardNo == cardno).ToList();
|
||||
@@ -233,7 +235,7 @@ namespace Ewide.NbzsZheliban.Service
|
||||
var dbTicket = db.Queryable<zjzwfwTickets>().Where(p => p.Ticket == ticket && p.ExpireTime > DateTime.Now).OrderBy(p => p.CreateTime, OrderByType.Desc).First();
|
||||
if (dbTicket != null)
|
||||
{
|
||||
var OriginalResponse = AESEncryption.Decrypt(dbTicket.OriginalResponse, Common.GetHashKey());
|
||||
var OriginalResponse = DESCEncryption.Decrypt(dbTicket.OriginalResponse, Common.GetZlbSecretKey());
|
||||
return JObject.Parse(OriginalResponse);
|
||||
}
|
||||
else
|
||||
@@ -287,11 +289,11 @@ namespace Ewide.NbzsZheliban.Service
|
||||
{
|
||||
ID = Guid.NewGuid().ToString(),
|
||||
Ticket = ticket,
|
||||
IdCardNo = AESEncryption.Encrypt(userinfoObj["idnum"].ToString(), Common.GetHashKey()),
|
||||
IdCardNo = MD5Encryption.Encrypt(userinfoObj["idnum"].ToString()),
|
||||
UserName = userinfoObj["username"].ToString(),
|
||||
ExpireTime = DateTime.Now.AddHours(4),//浙里办的token时效也是4个小时
|
||||
CreateTime = DateTime.Now,
|
||||
OriginalResponse = AESEncryption.Encrypt(userinfoRsltStr, Common.GetHashKey())
|
||||
OriginalResponse = DESCEncryption.Encrypt(userinfoRsltStr, Common.GetZlbSecretKey())
|
||||
}).ExecuteCommand();
|
||||
if (temp1 <= 0)
|
||||
throw Oops.Oh("出现异常,请联系管理员");
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace Ewide.NbzsZheliban.Tools
|
||||
{
|
||||
public class Common
|
||||
{
|
||||
public static string GetHashKey()
|
||||
public static string GetZlbSecretKey()
|
||||
{
|
||||
return App.GetConfig<string>("AesHashKey");
|
||||
return App.GetConfig<string>("ZlbSecretKey");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user