HashProviderFactory

HashProviderFactory implements a class factory for hash providers.

Namespace:
Inetdev.Security.Cryptography
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
Yes
Inherits from:
System.Object

Methods

Create

Creates a new instance of an IHashProvider using the SHA512Managed algorithm with salt addition disabled.

Signature:
public IHashProvider Create()

Create

Creates a new instance of an IHashProvider.

Signature:
public IHashProvider Create(options)
Remarks

If not configured, a SHA512Managed algorithm with salt addition disabled is returned.

Parameters
Name Type Summary
options CryptographyOptions Configuration options.

Create

Creates a new instance of a IHashProvider based on the HashAlgorithm of type algorithmType.

Signature:
public IHashProvider Create(algorithmType, saltEnabled)
Remarks

If algorithmType is null, a default SHA512Managed hash algorithm will be returned.

Parameters
Name Type Summary
algorithmType Type Type of the hash algorithm.
saltEnabled Boolean true if salt addition should be enebled.
Exceptions
Type Summary
ArgumentException Thrown when algorithmType is not a HashAlgorithm.

In this document