CryptoSys PKI Pro Manual

pbeScryptHex

Derives a hex-encoded key of any length from a password using the SCRYPT algorithm from RFC7914. The salt and derived key are encoded in hexadecimal.

Syntax

[VBA]
Public Function pbeScryptHex ( _
    dkBytes As Long, _
    szPwd As String, _
    szSaltHex As String, _
    nParamN As Long, _
    nParamR As Long, _
    nParamP As Long, _
    Optional nOptions As Long = 0 _
) As String

Parameters

dkBytes
Required length of key in bytes.
szPwd
Password (as normal text).
szSaltHex
Salt in hex-encoded format.
nParamN
CPU/Memory cost parameter N ("costParameter"), a number greater than one and a power of 2.
nParamR
Block size r ("blockSize").
nParamP
Parallelization parameter p ("parallelizationParameter").
nOptions
For future use.

Return Value

String: Key in hex format.

Example

Debug.Print pbeScryptHex(64, "password", "4E61436C", 1024, 8, 16)
' FDBABE1C9D3472007856E7190D01E9FE7C6AD7CBC8237830E77376634B3731622EAF30D92E22A3886FF109279D9830DAC727AFB94A83EE6D8360CBDFA2CC0640
[PREV: pbeScrypt...]   [Contents]   [Index]   
   [NEXT: pfxMakeFile...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.