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.
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
N
("costParameter"
), a number greater than one and a power of 2.r
("blockSize"
).p
("parallelizationParameter"
).
Debug.Print pbeScryptHex(64, "password", "4E61436C", 1024, 8, 16)
' FDBABE1C9D3472007856E7190D01E9FE7C6AD7CBC8237830E77376634B3731622EAF30D92E22A3886FF109279D9830DAC727AFB94A83EE6D8360CBDFA2CC0640