public string Login(LoginModel model)
{
string Salt = "!@#trtailw!#@";
model.Password = BitConverter.ToString(
MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(model.Password + Salt))
).Replace("-","");
return _loginRepository.Login(model);
}
记得要引入“System.Security.Cryptography.Algorithms” NuGet包。