Exemplo n.º 1
0
        public static string EncryptPassword(string password, string salt, IEncryptHelper encryptHelper)
        {
            var encryptedPwd = encryptHelper.Sha256Encrypt($"{password}-{salt}");

            return(encryptedPwd);
        }
Exemplo n.º 2
0
        public bool PasswordIsMatch(string input, IEncryptHelper encryptHelper)
        {
            var encryptedPwd = encryptHelper.Sha256Encrypt($"{input}-{this.Salt}");

            return(encryptedPwd == this.Password);
        }