Table of Contents

Class HttpInteractionValidator

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class HttpInteractionValidator
Inheritance
HttpInteractionValidator
Inherited Members

Constructors

HttpInteractionValidator(byte[])

public HttpInteractionValidator(byte[] publicKey)

Parameters

publicKey byte[]

HttpInteractionValidator(ReadOnlySpan<char>)

public HttpInteractionValidator(ReadOnlySpan<char> publicKey)

Parameters

publicKey ReadOnlySpan<char>

Methods

Validate(ReadOnlySpan<byte>, ReadOnlySpan<byte>)

public bool Validate(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> timestampAndBody)

Parameters

signature ReadOnlySpan<byte>

The hex decoded value of X-Signature-Ed25519 header.

timestampAndBody ReadOnlySpan<byte>

The value of X-Signature-Timestamp header as bytes appended by the request body.

Returns

bool

Validate(ReadOnlySpan<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>)

public bool Validate(ReadOnlySpan<byte> signature, ReadOnlySpan<byte> timestamp, ReadOnlySpan<byte> body)

Parameters

signature ReadOnlySpan<byte>

The hex decoded value of X-Signature-Ed25519 header.

timestamp ReadOnlySpan<byte>

The value of X-Signature-Timestamp header as bytes.

body ReadOnlySpan<byte>

The request body.

Returns

bool

Validate(ReadOnlySpan<char>, ReadOnlySpan<byte>)

public bool Validate(ReadOnlySpan<char> signature, ReadOnlySpan<byte> timestampAndBody)

Parameters

signature ReadOnlySpan<char>

The value of X-Signature-Ed25519 header.

timestampAndBody ReadOnlySpan<byte>

he value of X-Signature-Timestamp header as bytes appended by the request body.

Returns

bool

Validate(ReadOnlySpan<char>, ReadOnlySpan<char>, ReadOnlySpan<byte>)

public bool Validate(ReadOnlySpan<char> signature, ReadOnlySpan<char> timestamp, ReadOnlySpan<byte> body)

Parameters

signature ReadOnlySpan<char>

The value of X-Signature-Ed25519 header.

timestamp ReadOnlySpan<char>

The value of X-Signature-Timestamp header.

body ReadOnlySpan<byte>

The request body.

Returns

bool