Pbe.Scrypt Method (Int32, String, String, Int32, Int32, Int32)
Derives a key in hex format from a password with the salt in hex format
Syntax
[C#]
public static string Scrypt(
int dkLen,
string pwdStr,
string saltHex,
int N,
int r,
int p
)
[VB.NET]
Public Shared Function Scrypt ( _
dkLen As Integer, _
pwdStr As String, _
saltHex As String, _
N As Integer, _
r As Integer, _
p As Integer _
) As String
Parameters
- dkLen
- Required length of key in bytes
- pwdStr
- Password (normal text)
- saltHex
- Salt in hex format
- N
- CPU/Memory cost parameter, a number greater than one and a power of 2.
- r
- Block size r
- p
- Parallelization parameter p
Return Value
Key in hex format
Remarks
Password pwdStr is normal text, not hexadecimal
Example
[C#]
string keyHex = Pbe.Scrypt(64, "password", "4E61436C", 1024, 8, 16);
See Also
VB6/C equivalent: PBE_ScryptHex
[Contents] [Index]