Class PasswordUtility
- Namespace
- Raytha.Application.Common.Utils
- Assembly
- Raytha.Application.dll
public static class PasswordUtility
- Inheritance
-
PasswordUtility
- Inherited Members
-
Fields
PASSWORD_MIN_CHARACTER_LENGTH
public const int PASSWORD_MIN_CHARACTER_LENGTH = 8
Field Value
- int
Methods
Hash(byte[], byte[])
public static byte[] Hash(byte[] value, byte[] salt)
Parameters
value
byte[]
salt
byte[]
Returns
- byte[]
Hash(string)
public static byte[] Hash(string value)
Parameters
value
string
Returns
- byte[]
Hash(string, byte[])
public static byte[] Hash(string value, byte[] salt)
Parameters
value
string
salt
byte[]
Returns
- byte[]
IsMatch(byte[], byte[])
public static bool IsMatch(byte[] password1, byte[] password2)
Parameters
password1
byte[]
password2
byte[]
Returns
- bool
RandomPassword(int)
public static string RandomPassword(int length)
Parameters
length
int
Returns
- string
RandomSalt()
public static byte[] RandomSalt()
Returns
- byte[]