コード例 #1
0
        public static string EncryptPassword(string password, string salt, IEncryptHelper encryptHelper)
        {
            var encryptedPwd = encryptHelper.Sha256Encrypt($"{password}-{salt}");

            return(encryptedPwd);
        }
コード例 #2
0
ファイル: UserEntity.cs プロジェクト: neoayi/easyRBAC
        public bool PasswordIsMatch(string input, IEncryptHelper encryptHelper)
        {
            var encryptedPwd = encryptHelper.Sha256Encrypt($"{input}-{this.Salt}");

            return(encryptedPwd == this.Password);
        }