CryptoSys PKI Pro Manual

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

Derive a key in hex format of any length from a password with the salt in hex format.

Syntax

[C#]
public static string Kdf2(
	int dkLen,
	string pwdStr,
	string saltHex,
	int count
)
[VB.NET]
Public Shared Function Kdf2 ( _
	dkLen As Integer, _
	pwdStr As String, _
	saltHex As String, _
	count As Integer _
) As String

Parameters

dkLen
Required length of key in bytes
pwdStr
Password
saltHex
Salt in hex format
count
Iteration count

Return Value

Key in hex format

Remarks

The password is passed as normal text; the salt in hex format

Example

[C#]
string keyHex = Pbe.Kdf2(24, "password", "78578e5a5d63cb06", 2048);

See Also

VB6/C equivalent: PBE_Kdf2Hex

[Contents] [Index]

[PREV: Pbe.Kdf2 Method (Int32, Byte, Byte, Int32, HashAlgorithm)...]   [Contents]   [Index]   
   [NEXT: Pbe.Kdf2 Method (Int32, String, String, Int32, HashAlgorithm)...]

Copyright © 2004-21 D.I. Management Services Pty Ltd. All rights reserved. Generated 2021-10-01T09:03:20Z.