Table of Contents

Class ServerFinalMessage

Namespace
Ubiety.Scram.Core.Messages
Assembly
Ubiety.Scram.Core.dll

Represents the final message sent by the server in the SCRAM authentication process.

public class ServerFinalMessage
Inheritance
ServerFinalMessage
Inherited Members

Constructors

ServerFinalMessage(ServerSignatureAttribute)

Initializes a new instance of the ServerFinalMessage class.

public ServerFinalMessage(ServerSignatureAttribute serverSignature)

Parameters

serverSignature ServerSignatureAttribute

Server signature.

Properties

ServerSignature

Gets the server's computed signature during the SCRAM authentication process.

public ServerSignatureAttribute? ServerSignature { get; }

Property Value

ServerSignatureAttribute

Remarks

The ServerSignature ensures the integrity of the authentication handshake by verifying that the server knows the user's credentials without explicitly exposing them.

Methods

Parse(string)

Parses a server final message string into a ServerFinalMessage object.

public static ServerFinalMessage Parse(string message)

Parameters

message string

The server final message string to parse.

Returns

ServerFinalMessage

An instance of ServerFinalMessage parsed from the provided message.

Exceptions

MessageParseException

Thrown when the message cannot be parsed.

TryParse(string, out ServerFinalMessage)

Tries to parse a server final message from the given string.

public static bool TryParse(string message, out ServerFinalMessage finalMessage)

Parameters

message string

The message string to parse.

finalMessage ServerFinalMessage

The resulting ServerFinalMessage instance if parsing is successful.

Returns

bool

true if the parsing is successful; otherwise, false.

Operators

implicit operator ServerFinalMessage(byte[])

Implicitly converts a byte array to a ServerFinalMessage instance.

public static implicit operator ServerFinalMessage(byte[] message)

Parameters

message byte[]

The byte array containing the UTF-8 encoded message to convert.

Returns

ServerFinalMessage

A new ServerFinalMessage instance parsed from the byte array.

Exceptions

MessageParseException

Thrown when the message cannot be parsed.

implicit operator ServerFinalMessage(string)

Implicitly converts a string to a ServerFinalMessage instance.

public static implicit operator ServerFinalMessage(string message)

Parameters

message string

The string message to convert.

Returns

ServerFinalMessage

A new ServerFinalMessage instance parsed from the string.

Exceptions

MessageParseException

Thrown when the message cannot be parsed.