PbeKdf2(Int32, String, String, Int32, HashAlgorithm) Method |
Derive a key in hex format of any length from a password with the salt in hex format.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string Kdf2(
int dkLen,
string pwdStr,
string saltHex,
int count,
HashAlgorithm hashAlg = HashAlgorithm.Sha1
)
Public Shared Function Kdf2 (
dkLen As Integer,
pwdStr As String,
saltHex As String,
count As Integer,
Optional hashAlg As HashAlgorithm = HashAlgorithm.Sha1
) As String
Parameters
- dkLen Int32
- Required length of key in bytes
- pwdStr String
- Password
- saltHex String
- Salt in hex format
- count Int32
- Iteration count
- hashAlg HashAlgorithm (Optional)
- Hash algorithm to use in HMAC PRF (default is SHA-1)
Return Value
StringKey in hex format
See Also