|
| PasswordCrypto (string hashName, int keyLength) |
|
string | Hash (string password, out string salt) |
|
bool | Verify (string hashedPassword, string password, string salt) |
|
override string | ToString () |
|
Definition at line 21 of file PasswordCrypto.cs.
Deveel.Data.Security.PasswordCrypto.PasswordCrypto |
( |
string |
hashName, |
|
|
int |
keyLength |
|
) |
| |
|
inline |
Definition at line 22 of file PasswordCrypto.cs.
26 var hash = HashFunctions.GetFunction(hashName);
28 throw new ArgumentException(
String.Format(
"Hash function {0} is not supported.", hashName));
29 if (!(hash is IKeyedHashFunction))
30 throw new ArgumentException(
String.Format(
"Hash function {0} does not handle keys.", hashName));
A long string in the system.
IKeyedHashFunction HashFunction
string Deveel.Data.Security.PasswordCrypto.Hash |
( |
string |
password, |
|
|
out string |
salt |
|
) |
| |
|
inline |
static PasswordCrypto Deveel.Data.Security.PasswordCrypto.Parse |
( |
string |
defString | ) |
|
|
inlinestatic |
Definition at line 54 of file PasswordCrypto.cs.
55 if (
String.IsNullOrEmpty(defString))
56 throw new ArgumentNullException(
"defString");
58 var sIndex = defString.IndexOf(
'(');
60 throw new FormatException();
62 var eIndex = defString.IndexOf(
')');
64 throw new FormatException();
66 var hashName = defString.Substring(0, sIndex);
67 var sKeyLength = defString.Substring(sIndex + 1, eIndex - (sIndex + 1));
69 hashName = hashName.Trim();
71 if (
String.IsNullOrEmpty(hashName))
72 throw new FormatException();
75 if (!Int32.TryParse(sKeyLength, out keyLength))
76 throw new FormatException();
A long string in the system.
PasswordCrypto(string hashName, int keyLength)
override string Deveel.Data.Security.PasswordCrypto.ToString |
( |
| ) |
|
|
inline |
bool Deveel.Data.Security.PasswordCrypto.Verify |
( |
string |
hashedPassword, |
|
|
string |
password, |
|
|
string |
salt |
|
) |
| |
|
inline |
Definition at line 46 of file PasswordCrypto.cs.
47 return HashFunction.VerifyPbkdf2String(hashedPassword, password, salt);
IKeyedHashFunction HashFunction
string Deveel.Data.Security.PasswordCrypto.HashName |
|
getprivate set |
int Deveel.Data.Security.PasswordCrypto.KeyLength |
|
getprivate set |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Security/PasswordCrypto.cs