Show / Hide Table of Contents

UseKey Method

UseKey(ReadOnlyMemory<byte>)

Explicitly sets the key of the credential.

C#
public ConfigureChallengeResponse UseKey(ReadOnlyMemory<byte> bytes)

Parameters

Type Name Description
ReadOnlyMemory<byte> bytes

A collection of bytes to use for the key.

Returns

ConfigureChallengeResponse

The current ConfigureChallengeResponse instance.

Exceptions

Type Condition
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.

In this article
Back to top Generated by DocFX