This commit is contained in:
2026-03-25 14:55:34 +08:00
commit 2c44b3a4b2
131 changed files with 7453 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
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);
}
}