Generate a key-encryption key (KEK) from input keying material (IKM) using a key derivation function (KDF).
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static byte[] Bytes(
int dkLen,
byte[] ikm,
KdfKdfAlg kdfAlg = KdfKdfAlg.X963,
KdfHashAlg hashAlg = KdfHashAlg.Sha1,
byte[] sharedInfo = null,
string paramString = ""
)
Public Shared Function Bytes (
dkLen As Integer,
ikm As Byte(),
Optional kdfAlg As KdfKdfAlg = KdfKdfAlg.X963,
Optional hashAlg As KdfHashAlg = KdfHashAlg.Sha1,
Optional sharedInfo As Byte() = Nothing,
Optional paramString As String = ""
) As Byte()
Parameters
- dkLen Int32
- Required length of output key material in bytes.
- ikm Byte
- Input key material/shared secret.
- kdfAlg KdfKdfAlg (Optional)
- Key derivation function to use.
- hashAlg KdfHashAlg (Optional)
- Hash algorithm to use with the key derivation function (default is SHA-1)
- sharedInfo Byte (Optional)
- SharedInfo (optional)
- paramString String (Optional)
- Optional parameters. Set as "" for defaults.
Pass attribute-value salt=<hex-digits> to set the optional salt parameter for the HKDF algorithm,
e.g. "salt=606162636465666768696a6b6c6d6e6f;"
Return Value
ByteOutput key material (KEK).
See Also