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 |
---|---|---|
System.Memory<System.Byte> | key |
Returns
The current ConfigureYubicoOtp instance.
Exceptions
Type | Condition |
---|---|
System.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.