Argon2Configuration Constructor
Namespace: Rebex.Security.Cryptography
Assembly: Rebex.Security.dll (version 8.0.9673)
Argon2Configuration(Argon2Type, Int32, Int32, Int32)
Initializes a new instance of Argon2Configuration class.
Declaration
public Argon2Configuration(Argon2Type argon2Type, int numberOfLanes, int numberOfIterations, int memoryCost)
Parameters
| Type | Name | Description |
|---|---|---|
| Argon2Type | argon2Type | The type of Argon2 algorithm. Parameter 'y' from Argon2 specification. |
| Int32 | numberOfLanes | The number of independent computation lanes. Parameter 'p' from Argon2 specification. The valid range for this value is 1 to 16 777 215. |
| Int32 | numberOfIterations | The number of Argon2 iterations. Parameter 't' from Argon2 specification. This value must be greater than 0. |
| Int32 | memoryCost | The amount of memory, in kilobytes (KB), used by the Argon2 algorithm. Parameter 'm' from Argon2 specification. This value must be equal to or greater than 1 KB. |
Remarks
The effective amount of memory (MemoryCost) is aligned to a multiple of '4 * p', where p is NumberOfLanes (the degree of parallelism). Values below the minimum of '8 * p' are raised to '8 * p', so a small value such as '1 KB' may result in more memory being used than requested.
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The |