Show / Hide Table of Contents

Class CryptoUtility

Provides cryptography utilities.

Inheritance
System.Object
CryptoUtility
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Celerik.NetCore.Util
Assembly: cs.temp.dll.dll
Syntax
public static class CryptoUtility

Methods

HashPassword(String)

Returns a hashed representation of the specified password.

Declaration
public static string HashPassword(string password)
Parameters
Type Name Description
System.String password

The password to generate a hash value for.

Returns
Type Description
System.String

The hash value for password as a base-64-encoded string.

Exceptions
Type Condition
System.ArgumentNullException

Password is null.

VerifyHashedPassword(String, String)

Determines whether the specified RFC 2898 hash and password are a cryptographic match.

Declaration
public static bool VerifyHashedPassword(string hash, string password)
Parameters
Type Name Description
System.String hash

The previously-computed RFC 2898 hash value as a base-64-encoded string.

System.String password

The plaintext password to cryptographically compare with hashedPassword.

Returns
Type Description
System.Boolean

True if the hash value is a cryptographic match for the password; otherwise, false.

Exceptions
Type Condition
System.ArgumentNullException

HashedPassword or password are null.

In This Article
Back to top Generated by DocFX