Skip to content

AuthenticatorProtocol

MarcoDotIO edited this page Apr 25, 2023 · 1 revision

AuthenticatorProtocol

public protocol AuthenticatorProtocol: KeyProtocol 

Inheritance

KeyProtocol

Requirements

verify(_:​)

Verifies the contents of the provided data.

func verify(_ data: Data) throws -> Bool

This function takes in a Data object and attempts to verify its contents. It returns true if the data is valid and false otherwise.

Parameters

  • data: The data to be verified.

Throws

An error of type VerificationError if the data cannot be verified.

Returns

A boolean value indicating whether or not the data is valid.

isEqualTo(_:​_:​)

Compares the current Ed25519Authenticator instance to another object conforming to AuthenticatorProtocol, and returns a boolean indicating whether they have the same publicKey and signature properties.

func isEqualTo(_ rhs: any AuthenticatorProtocol) -> Bool

Parameters

  • rhs: The other object conforming to AuthenticatorProtocol to compare against.

Returns

A boolean indicating whether the two objects have the same publicKey and signature properties.

Types
Protocols
Global Variables
Global Functions
Extensions
Clone this wiki locally