Argon2MBS class constants

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Argon2MBS constants

Constants

Constant Value Description
kMaxAssociatedDataLength &hFFFFFFFF Maximum associated data length in bytes.
kMaxLanes &hFFFFFF Maximum number of lanes (degree of parallelism)
kMaxMemory &hFFFFFFFF Maximum memory size.
kMaxOutputLength &hFFFFFFFF Maximum digest size in bytes.
kMaxPasswordLength &hFFFFFFFF Maximum password length in bytes.
kMaxSaltLength &hFFFFFFFF Maximum salt length in bytes
kMaxSecretLength &hFFFFFFFF Maximum key length in bytes.
kMaxThreads &hFFFFFF Maximum number of threads.
kMaxTime &hFFFFFFFF Maximum number of passes.
kMinAssociatedDataLength 0 Minimum associated data length in bytes.
kMinLanes 1 Minimum number of lanes (degree of parallelism)
kMinMemory 8 Minimum and maximum number of memory blocks (each of BLOCK_SIZE bytes)
kMinOutputLength 4 Minimum digest size in bytes.
kMinPasswordLength 0 Minimum password length in bytes.
kMinSaltLength 0 Minimum salt length in bytes
kMinSecretLength 0 Minimum key length in bytes.
kMinThreads 1 Minimum number of threads.
kMinTime 1 Minimum number of passes.
kSyncPoints 4 Number of synchronization points between lanes per pass.

Errors

Constant Value Description
kErrorAdPtrMismatch -21 AssociatedData ptr is nil, but size > 0.
kErrorAdTooLong -9 AssociatedData too long.
kErrorAdTooShort -8 AssociatedData too short.
kErrorAllocateMemoryCbkNull -24 Allocation failed.
kErrorDecodingFail -32 Decoding failed.
kErrorDecodingLengthFail -34 Decoding length failed.
kErrorEncodingFail -31 Encoding failed.
kErrorFreeMemoryCbkNull -23 Free memory failed.
kErrorIncorrectParameter -25 Incorrect parameter.
kErrorIncorrectType -26 Incorrect type.
kErrorLanesTooFew -16 Lanes too small.
kErrorLanesTooMany -17 Too many lanes.
kErrorMemoryAllocationError -22 Memory allocation failed.
kErrorMemoryTooLittle -14 Memory too little.
kErrorMemoryTooMuch -15 Memory too big.
kErrorMissingArgs -30 Missing Argument.
kErrorOk 0 Okay.
kErrorOutPtrMismatch -27 Output ptr is nil, but size > 0.
kErrorOutputPtrNull -1 Output Ptr is nil.
kErrorOutputTooLong -3 Output too long.
kErrorOutputTooShort -2 Output too short.
kErrorPwdPtrMismatch -18 Password ptr is nil, but size > 0.
kErrorPwdTooLong -5 Password too long.
kErrorPwdTooShort -4 Password too short.
kErrorSaltPtrMismatch -19 Salt ptr is nil, but size > 0.
kErrorSaltTooLong -7 Salt too long.
kErrorSaltTooShort -6 Salt too short.
kErrorSecretPtrMismatch -20 Secret ptr is nil, but size > 0.
kErrorSecretTooLong -11 Secret too long.
kErrorSecretTooShort -10 Secret too short.
kErrorThreadFail -33 Threads failed.
kErrorThreadsTooFew -28 Threads too small.
kErrorThreadsTooMany -29 Too many threads.
kErrorTimeTooLarge -13 Time too large.
kErrorTimeTooSmall -12 Time too small.
kErrorVerifyMismatch -35 Verify Mismatch

Flags

Constant Value Description
kFlagClearMemory 4 Clear memory.
kFlagClearPassword 1 Clear password.
kFlagClearSecret 2 Clear Secret after hashing.
kFlagDefault 4 Default flags.

Type Codes

Constant Value Description
kTypeD 0 Argon2d is faster and uses data-depending memory access, which makes it highly resistant against GPU cracking attacks and suitable for applications with no threats from side-channel timing attacks (eg. cryptocurrencies).
kTypeI 1 Argon2i instead uses data-independent memory access, which is preferred for password hashing and password-based key derivation, but it is slower as it makes more passes over the memory to protect from tradeoff attacks.

Version

Constant Value Description
kVersion10 &h10 Version 1.0
kVersion13 &h13 Version 1.3

💬 Ask a question or report a problem