HashProviderFactory implements a class factory for hash providers.
Creates a new instance of an IHashProvider using the SHA512Managed algorithm with salt addition disabled.
public IHashProvider Create()
Creates a new instance of an IHashProvider.
public IHashProvider Create(options)
If not configured, a SHA512Managed algorithm with salt addition disabled is returned.
Name | Type | Summary |
---|---|---|
options | CryptographyOptions | Configuration options. |
Creates a new instance of a IHashProvider based on the HashAlgorithm of type algorithmType.
public IHashProvider Create(algorithmType, saltEnabled)
If algorithmType is null, a default SHA512Managed hash algorithm will be returned.
Name | Type | Summary |
---|---|---|
algorithmType | Type | Type of the hash algorithm. |
saltEnabled | Boolean | true if salt addition should be enebled. |
Type | Summary |
---|---|
ArgumentException | Thrown when algorithmType is not a HashAlgorithm. |