SecurePassOptions to configure work settings of Argon2ID.
Length of the Password Hash output buffer.
Length of the secret Key buffer returned by generateOneTimeAuth and generateOneTimeAuthCode.
Length of the Mac buffer returned by generateOneTimeAuth.
Default Memory Limit. 64MB.
Interactive Memory Limit. 64MB. This value is the same as MemLimitDefault. This memory limit is recommended for interactive "online" applications, when combined with OpsLimitInteractive, this option requires 64 MiB of dedicated RAM and provides a baseline configuration for web app security. Choosing a higher value such as MemLimitModerate, MemLimitSensitive or a custom value may improve security.
The Maximum Allowed Memory Limit. 4TB.
The Minimum Allowed Memory Limit. 8KB.
Moderate Memory Limit. 256MB. This memory limit, combined with OpsLimitModerate provides a good performance and security baseline for applications that require higher security than the default/interactive preset. Use of this option requires a minimum of 256 MiB of dedicated RAM.
Sensitive Memory Limit. 1GB. This memory limit, combined with OpsLimitSensitive, is recommended for highly sensitive data and non-interactive operations. Use of this option requires a minimum of 1024 MiB of dedicated RAM.
Default Operations Limit. 2 Operations.
Interactive Operations Limit. 2 Operations.This value is the same as OpsLimitDefault. This operations limit is recommended for interactive "online" applications, when combined with MemLimitInteractive, this option provides a baseline configuration for web app security. Choosing a higher value such as MemLimitModerate, MemLimitSensitive or a custom value may improve security.
The Maximum Allowed Operations Limit. 4294967295 Operations.
The Minimum Allowed Operations Limit. 1 Operation.
Moderate Operations Limit. 3 Operations. This operations limit, combined with MemLimitModerate provides a good performance and security baseline for applications that require higher security than the default/interactive preset. Using this options takes around 0.7 seconds to derrive a hash on a 2.8Ghz Core i7 CPU.
Sensitive Operations Limit. 4 Operations. This memory limit, combined with OpsLimitSensitive, is recommended for highly sensitive data and non-interactive operations. Using this option it takes around 3.5 seconds to derrive a hash on a 2.8Ghz Core i7 CPU.
Maxium Length for the Password input buffer.
Minimum Length for the Password input buffer.
Length of the Salt buffer.
Returns the currently configured Memory Limit.
Sets the Memory Limit to the new value provided.
The new Memory Limit.
Returns the currently configured Operations Limit.
Sets the Operations Limit to the new value provided.
Takes the provided password and returns the derived Argon2ID hash.
The password to be hashed.
Takes the provided password and returns the derived Argon2ID hash.
The password to be hashed.
Takes the provided password and the hash buffer and returns the result of the verification as an enumeration value.
The password to be verified.
The hash to be verified against.
Takes the provided password and the hash buffer and returns the result of the verification as an enumeration value.
The password to be verified.
The hash to be verified against.
Generates a random key, and then uses that key and the supplied message, to generate a one time authentication mac.
The message to be used as the base of the one time authentication key.
Generates a random key, and then uses that key and the supplied message, to generate a one time authentication code.
The message to be used as the base of the one time authentication code.
Tests a VerificationResult enumeration and returns true if the value is Invalid.
The VerificationResult to Test.
Tests a VerificationResult enumeration and returns true if the value is InvalidOrUnrecognized.
The VerificationResult to Test.
Tests a VerificationResult enumeration and returns true if the value is Valid.
The VerificationResult to Test.
Tests a VerificationResult enumeration and returns true if the value is ValidNeedsRehash.
The VerificationResult to Test.
Verifys the authenticity of the mac using the supplied message and, the key returned when generating the mac.
The authentication mac generated by generateOneTimeAuth.
The original message used to generate the mac.
The authentication key generated by generateOneTimeAuth.
Verifys the authenticity of the supplied authentication code using the key returned when generating the code.
The one time authentication code generated by generateOneTimeAuthCode.
The authentication key generated by generateOneTimeAuthCode.
Generated using TypeDoc
Create a new instance of SecurePass to hash passwords, verify passwords, generate one time reset tokens and verify one time reset tokens.