GenerateKey Method
GenerateKey(Memory<byte>)
Generates a cryptographically random series of bytes as the key for the Yubico OTP credential.
C#
public ConfigureYubicoOtp GenerateKey(Memory<byte> key)
Parameters
Type | Name | Description |
---|---|---|
Memory<byte> | key |
Returns
The current ConfigureYubicoOtp instance.
Exceptions
Type | Condition |
---|---|
InvalidOperationException | This will be thrown if the caller called UseKey(Memory<byte>) before calling this method. |
Remarks
Generating a key is not compatible with setting an explicit byte collection as the key. Specifying both will result in an exception.