Files
StopShopping/StopShopping.Services/Implementions/CipherService.cs
2026-03-25 14:55:34 +08:00

19 lines
449 B
C#

using System.Security.Cryptography;
using System.Text;
namespace StopShopping.Services.Implementions;
public class CipherService : ICipherService
{
public string EncryptUserPassword(string input)
{
string hmacKey = "stopshopping";
using HMACSHA256 sha256 = new(Encoding.UTF8.GetBytes(hmacKey));
var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes(input));
return Convert.ToHexStringLower(hash);
}
}