GenerateKey Method
GenerateKey(Memory<Byte>)
Generates a cryptographically random series of bytes as the key for the credential.
C#
public ConfigureHotp GenerateKey(Memory<byte> key)
Parameters
Type | Name | Description |
---|---|---|
System.Memory<System.Byte> | key |
Returns
The current ConfigureHotp instance.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This will be thrown if the caller called UseKey(ReadOnlyMemory<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.