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 |
---|---|---|
Memory<byte> | key |
Returns
The current ConfigureHotp instance.
Exceptions
Type | Condition |
---|---|
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.