Update Ras 加密

This commit is contained in:
2021-05-12 17:28:23 +08:00
parent ead8ca4063
commit c10388b5f2
10 changed files with 296 additions and 78 deletions

View File

@@ -1,4 +1,5 @@
using Furion;
using Ewide.Core.Util;
using Furion;
using Furion.DatabaseAccessor;
using Furion.DatabaseAccessor.Extensions;
using Furion.DataEncryption;
@@ -69,8 +70,9 @@ namespace Ewide.Core.Service
[AllowAnonymous]
public async Task<string> LoginAsync([Required] LoginInput input)
{
string pwd = RSAHandler.RSADecrypt(input.Password);
// 获取加密后的密码
var encryptPasswod = MD5Encryption.Encrypt(input.Password);
var encryptPasswod = MD5Encryption.Encrypt(pwd);
// 判断用户名和密码是否正确
var user = await _sysUserRep.FirstOrDefaultAsync(u => u.Account.Equals(input.Account) && u.Password.Equals(encryptPasswod));