CryptoSys PKI Pro Manual

Pbe.Scrypt(Int32, String, String, Int32, Int32, Int32) Method

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]
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  Int32
Required length of key in bytes
pwdStr  String
Password (normal text)
saltHex  String
Salt in hex format
N  Int32
CPU/Memory cost parameter, a number greater than one and a power of 2.
r  Int32
Block size r
p  Int32
Parallelization parameter p

Return Value

String
Key in hex format

Remarks

Password pwdStr is normal text, not hexadecimal

Example

string keyHex = Pbe.Scrypt(64, "password", "4E61436C", 1024, 8, 16);

See Also

VB6/C equivalent: PBE_ScryptHex

[Contents] [Index]

[PREV: Pbe.Scrypt(Int32, Byte, Byte, Int32, Int32, Int32) Method...]   [Contents]   [Index]   
   [NEXT: Pem.FileFromBinFile Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.