UseKey Method
UseKey(ReadOnlyMemory<Byte>)
Explicitly sets the key of the credential.
C#
public ConfigureChallengeResponse UseKey(ReadOnlyMemory<byte> bytes)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | bytes | A collection of bytes to use for the key. |
Returns
The current ConfigureChallengeResponse instance.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This is thrown when GenerateKey(Memory<Byte>) has been called before this. |
Remarks
Setting an explicit key is not compatible with generating a key. Specifying both will result in an exception.