Hkdf..::..DeriveKey Method (HashAlgorithmName, array<Byte>[]()[][], Int32, array<Nullable<(Of <(<'Byte>)>)>>[]()[][], array<Nullable<(Of <(<'Byte>)>)>>[]()[][])
Derives the output keying material of the desired length from the input key material using the optional salt and context information.
Namespace:
SecretNET.CryptoAssembly: SecretNET (in SecretNET.dll)
Syntax
Parameters
- hashAlgorithmName
- Type: HashAlgorithmName
The hash algorithm to be used by the HMAC primitive. Supported hash functions: MD5, SHA1, SHA256, SHA384, SHA512.
- ikm
- Type: array<Byte>[]()[][]
The input key material.
- outputLength
- Type: Int32
The desired length of the generated output keying material in bytes. Minimum value - 1. Maximum value - 255 times the size of the hash algorithm output, i.e.: MD5 - 4080, SHA1 - 5100, SHA256 - 8160, SHA384 - 12240, SHA512 - 16320.
Return Value
The output keying material.Exceptions
Exception | Condition |
---|---|
[ArgumentNullException] | The argument ikm is null. |
[ArgumentOutOfRangeException] | The hash algorithm specified in the parameter hashAlgorithmName is not supported or the value of the parameter outputLength is invalid (either too small or too large). |