Argon2Hash(String, String, Int32, Int32, Int32, Argon2Type, Int32) Method
Hash the given password to an Argon2 hash string.
Namespace: Gemstone.Security.Cryptography.Argon2HashAssembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.167 -- Release Build+327f7394dcedeaebafc0dd7a935c53bbb45ff86a
Gemstone.Security.Cryptography.Argon2Hash.Argon2.Hash = function(password, secret, timeCost, memoryCost, parallelism, type, hashLength);
- password String
-
The password to hash. Gets UTF-8 encoded before hashing.
- secret String
-
The secret to use in creating the hash. UTF-8 encoded before hashing. May be null. A
string.Empty is treated the same as null.
- timeCost Int32 (Optional)
-
The time cost to use. Defaults to 3.
- memoryCost Int32 (Optional)
-
The target memory cost to use. Defaults to 65536 (65536 * 1024 = 64MB). MemoryCost for detail on calculating the actual memory
used from this value.
- parallelism Int32 (Optional)
-
The parallelism to use. Default to 1 (single threaded).
- type Argon2Type (Optional)
-
Data-dependent, data-independent, or hybrid. Defaults to hybrid
(as recommended for password hashing).
- hashLength Int32 (Optional)
-
The length of the hash in bytes. Note, the string returned base-64
encodes this with other parameters so the resulting string is
significantly longer.
String
The Argon2 hash of the given password.