Argon2Verify(String, String, String, Int32) Method

Verify the given Argon2 hash as being that of the given password.

Definition

Namespace: Gemstone.Security.Cryptography.Argon2Hash
Assembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.171 -- Release Build+9bbaecd83e44e0973a7b18ef958272cfb4d67729
public static bool Verify(
	string encoded,
	string password,
	string? secret,
	int threads
)

Parameters

encoded  String
The Argon2 hash string. This has the actual hash along with other parameters used in the hash.
password  String
The password to verify. This gets UTF-8 encoded.
secret  String
The secret used in the creation of encoded. UTF-8 encoded to create the byte-buffer actually used in the verification. May be null for no secret. string.Empty is treated as null.
threads  Int32
The number of threads to use. Setting this to a higher number than the "p=" parameter in the encoded string doesn't cause even more parallelism.

Return Value

Boolean
True on success; false otherwise.

See Also