Struct HashOptions
- Namespace
- AetherUtils.Core.Structs
- Assembly
- AetherUtils.Core.dll
Represents the options used for performing hashing functions. If unspecified at struct creation,
the HashAlgorithm defaults to SHA384
and the Encoding defaults to Base64.
Once created, the properties cannot be changed.
public readonly struct HashOptions
- Inherited Members
Constructors
HashOptions(ReadOnlyPair<int, int>)
Create a new hash options specifying the iterations.
[UsedImplicitly]
public HashOptions(ReadOnlyPair<int, int> iterations)
Parameters
iterationsReadOnlyPair<int, int>
HashOptions(ReadOnlyPair<int, int>, HashEncoding)
Create a new hash options specifying the iterations and the hash encoding.
[UsedImplicitly]
public HashOptions(ReadOnlyPair<int, int> iterations, HashEncoding hashEncoding)
Parameters
iterationsReadOnlyPair<int, int>hashEncodingHashEncoding
HashOptions(ReadOnlyPair<int, int>, HashAlgorithmName, HashEncoding)
Create a new hash options specifying the iterations, the hash algorithm, and the hash encoding.
[UsedImplicitly]
public HashOptions(ReadOnlyPair<int, int> iterations, HashAlgorithmName hashAlgorithm, HashEncoding hashEncoding)
Parameters
iterationsReadOnlyPair<int, int>hashAlgorithmHashAlgorithmNamehashEncodingHashEncoding
HashOptions(int, ReadOnlyPair<int, int>, HashAlgorithmName)
Create a new hash options specifying the salt length, the iterations, and the hash algorithm.
[UsedImplicitly]
public HashOptions(int saltLength, ReadOnlyPair<int, int> iterations, HashAlgorithmName hashAlgorithm)
Parameters
saltLengthintiterationsReadOnlyPair<int, int>hashAlgorithmHashAlgorithmName
HashOptions(int, ReadOnlyPair<int, int>, HashAlgorithmName, HashEncoding)
Create a new hash options specifying the salt length, iterations, the hash algorithm, and the hash encoding.
[UsedImplicitly]
public HashOptions(int saltLength, ReadOnlyPair<int, int> iterations, HashAlgorithmName hashAlgorithm, HashEncoding hashEncoding)
Parameters
saltLengthintiterationsReadOnlyPair<int, int>hashAlgorithmHashAlgorithmNamehashEncodingHashEncoding
HashOptions(int, int)
Create a new hash options specifying the minimum and maximum iterations seperately.
[UsedImplicitly]
public HashOptions(int minIterations, int maxIterations)
Parameters
HashOptions(int, int, HashEncoding)
Create a new hash options specifying the minimum and maximum iterations and the hash encoding.
[UsedImplicitly]
public HashOptions(int minIterations, int maxIterations, HashEncoding hashEncoding)
Parameters
minIterationsintmaxIterationsinthashEncodingHashEncoding
HashOptions(int, int, int)
Create a new hash options specifying the salt length and the minimum and maximum iterations.
[UsedImplicitly]
public HashOptions(int saltLength, int minIterations, int maxIterations)
Parameters
HashOptions(int, int, int, int)
Create a new hash options specifying the salt length, the key size, and the minimum and maximum iterations.
[UsedImplicitly]
public HashOptions(int saltLength, int keySize, int minIterations, int maxIterations)
Parameters
HashOptions(int, int, int, int, HashAlgorithmName)
Create a new hash options specifying the salt length, the key size, the minimum and maximum iterations, and the
hash algorithm.
[UsedImplicitly]
public HashOptions(int saltLength, int keySize, int minIterations, int maxIterations, HashAlgorithmName hashAlgorithm)
Parameters
saltLengthintkeySizeintminIterationsintmaxIterationsinthashAlgorithmHashAlgorithmName
HashOptions(int, int, int, int, HashAlgorithmName, HashEncoding)
Create a new hash options specifying the salt length, the key size, the minimum and maximum iterations,
the hash algorithm, and the hash encoding.
[UsedImplicitly]
public HashOptions(int saltLength, int keySize, int minIterations, int maxIterations, HashAlgorithmName hashAlgorithm, HashEncoding hashEncoding)
Parameters
saltLengthintkeySizeintminIterationsintmaxIterationsinthashAlgorithmHashAlgorithmNamehashEncodingHashEncoding
HashOptions(int, int, HashAlgorithmName)
Create a new hash options specifying the minimum and maximum iterations and the hash algorithm.
[UsedImplicitly]
public HashOptions(int minIterations, int maxIterations, HashAlgorithmName hashAlgorithm)
Parameters
minIterationsintmaxIterationsinthashAlgorithmHashAlgorithmName
HashOptions(int, int, HashAlgorithmName, HashEncoding)
Create a new hash options specifying the minimum and maximum iterations, the hash algorithm, and the hash encoding.
[UsedImplicitly]
public HashOptions(int minIterations, int maxIterations, HashAlgorithmName hashAlgorithm, HashEncoding hashEncoding)
Parameters
minIterationsintmaxIterationsinthashAlgorithmHashAlgorithmNamehashEncodingHashEncoding
Properties
Encoding
The encoding scheme to use when hashing.
public HashEncoding Encoding { get; }
Property Value
HashAlgorithm
The algorithm to use when hashing.
public HashAlgorithmName HashAlgorithm { get; }
Property Value
Iterations
The number of iterations to perform when hashing.
A cryptographically strong random value between the minimum and maximum iterations is retrieved every time this property is retrieved.
public int Iterations { get; }
Property Value
KeySize
The size (in bytes) of the hash key used when hashing.
public int KeySize { get; }
Property Value
SaltLength
The length (in bytes) used for the salt when hashing.
public int SaltLength { get; }