Show / Hide Table of Contents

GenerateKey Method

GenerateKey(Memory<byte>)

Generates a cryptographically random series of bytes as the key for the credential.

C#
public ConfigureChallengeResponse GenerateKey(Memory<byte> key)

Parameters

Type Name Description
Memory<byte> key

Returns

ConfigureChallengeResponse

The current ConfigureChallengeResponse 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.

In this article
Back to top Generated by DocFX