1
0
mirror of https://github.com/XFox111/SimpleOTP.git synced 2026-04-22 08:00:45 +03:00
1
simpleotp.hashalgorithmproviders
Eugene Fox edited this page 2024-09-18 16:14:00 +03:00

HashAlgorithmProviders

Namespace: SimpleOTP

Provides methods for registering and retrieving providers.

public static class HashAlgorithmProviders

Inheritance ObjectHashAlgorithmProviders
Attributes NullableContextAttribute, NullableAttribute

Methods

AddProvider(OtpAlgorithm, KeyedHashAlgorithm)

Registers a new provider.

public static void AddProvider(OtpAlgorithm algorithm, KeyedHashAlgorithm algorithmProvider)

Parameters

algorithm OtpAlgorithm
The algorithm to register.

algorithmProvider KeyedHashAlgorithm
The provider to register.

GetProvider(OtpAlgorithm)

Retrieves a provider.

public static KeyedHashAlgorithm GetProvider(OtpAlgorithm algorithm)

Parameters

algorithm OtpAlgorithm
The algorithm to retrieve.

Returns

KeyedHashAlgorithm
The provider, or null if not found.

RemoveProvider(OtpAlgorithm)

Removes a provider.

public static void RemoveProvider(OtpAlgorithm algorithm)

Parameters

algorithm OtpAlgorithm
The algorithm to remove.

IsRegistered(OtpAlgorithm)

Determines whether a provider is registered.

public static bool IsRegistered(OtpAlgorithm algorithm)

Parameters

algorithm OtpAlgorithm
The algorithm to check.

Returns

Boolean
true if the provider is registered; otherwise, false.

ClearProviders()

Removes all registered providers.

public static void ClearProviders()

Remarks:

This method also clears default providers. Use with caution.