HashAlgorithmProviders
Namespace: SimpleOTP
Provides methods for registering and retrieving providers.
Inheritance Object → HashAlgorithmProviders
Attributes NullableContextAttribute, NullableAttribute
Methods
AddProvider(OtpAlgorithm, KeyedHashAlgorithm)
Registers a new provider.
Parameters
algorithm OtpAlgorithm
The algorithm to register.
algorithmProvider KeyedHashAlgorithm
The provider to register.
GetProvider(OtpAlgorithm)
Retrieves a provider.
Parameters
algorithm OtpAlgorithm
The algorithm to retrieve.
Returns
KeyedHashAlgorithm
The provider, or null if not found.
RemoveProvider(OtpAlgorithm)
Removes a provider.
Parameters
algorithm OtpAlgorithm
The algorithm to remove.
IsRegistered(OtpAlgorithm)
Determines whether a provider is registered.
Parameters
algorithm OtpAlgorithm
The algorithm to check.
Returns
Boolean
true if the provider is registered; otherwise, false.
ClearProviders()
Removes all registered providers.
Remarks:
This method also clears default providers. Use with caution.