Argon2 Constructor
Namespace: Rebex.Security.Cryptography
Assembly: Rebex.Security.dll (version 7.0.9083)
Argon2(Argon2Configuration, Byte[], Byte[], Byte[], Byte[])
Initializes a new instance of Argon2 class.
Declaration
public Argon2(Argon2Configuration configuration, byte[] password, byte[] salt, byte[] key, byte[] associatedData)
Parameters
Type | Name | Description |
---|---|---|
Argon2Configuration | configuration | Argon2 configuration. |
Byte[] | password | The password used in DeriveBytes method. Parameter 'P' from Argon2 specification. When a null value is specified, the password is treated as an empty array. |
Byte[] | salt | The salt used used in DeriveBytes method. Must be at least 8 bytes long. Parameter 'S' from Argon2 specification. |
Byte[] | key | The secret key used in DeriveBytes method. Parameter 'K' from Argon2 specification. When a null value is specified, the key is treated as an empty array. |
Byte[] | associatedData | The associated data used in DeriveBytes method. Parameter 'X' from Argon2 specification. When a null value is specified, the associatedData is treated as an empty array. |
Remarks
- The instance of Argon2 class creates, uses, and clears a copy of the
password
. - The instance of Argon2 class is not the owner of the
password
. - The instance of Argon2 class creates, uses, and clears a copy of the
salt
. - The instance of Argon2 class is not the owner of the
salt
. - The instance of Argon2 class creates, uses, and clears a copy of the
key
. - The instance of Argon2 class is not the owner of the
key
. - The instance of Argon2 class creates, uses, and clears a copy of the
associatedData
. - The instance of Argon2 class is not the owner of the
associatedData
.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
Argon2(Argon2Configuration, Byte[], Byte[], Byte[])
Initializes a new instance of Argon2 class.
Declaration
public Argon2(Argon2Configuration configuration, byte[] password, byte[] salt, byte[] key)
Parameters
Type | Name | Description |
---|---|---|
Argon2Configuration | configuration | Argon2 configuration. |
Byte[] | password | The password used in the DeriveBytes method. Parameter 'P' from Argon2 specification. When a null value is specified, the password is treated as an empty array. |
Byte[] | salt | The salt used used in the DeriveBytes method. Must be at least 8 bytes long. Parameter 'S' from Argon2 specification. |
Byte[] | key | The secret used in DeriveBytes method. Parameter 'K' from Argon2 specification. When a null value is specified, the key is treated as an empty array. |
Remarks
- An instance of Argon2 class creates, uses, and clears a copy of the
password
. - An instance of Argon2 class is not the owner of the
password
. - An instance of Argon2 class creates, uses, and clears a copy of the
salt
. - An instance of Argon2 class is not the owner of the
salt
. - An instance of Argon2 class creates, uses, and clears a copy of the
key
. - An instance of Argon2 class is not the owner of the
key
.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentException | The |
Argon2(Argon2Configuration, Byte[], Byte[])
Initializes a new instance of Argon2 class.
Declaration
public Argon2(Argon2Configuration configuration, byte[] password, byte[] salt)
Parameters
Type | Name | Description |
---|---|---|
Argon2Configuration | configuration | Argon2 configuration. |
Byte[] | password | The password used in the DeriveBytes method. Parameter 'P' from Argon2 specification. When a null value is specified, the password is treated as an empty array. |
Byte[] | salt | The salt used used in the DeriveBytes method. Must be at least 8 bytes long. Parameter 'S' from Argon2 specification. |
Remarks
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentOutOfRangeException | The |