Crate argon2_sys[][src]

Re-exports

pub use Argon2_type as argon2_type;
pub use Argon2_version as argon2_version;

Structs

Argon2_Context

Constants

ARGON2_AD_PTR_MISMATCH
ARGON2_AD_TOO_LONG
ARGON2_AD_TOO_SHORT
ARGON2_ALLOCATE_MEMORY_CBK_NULL
ARGON2_DECODING_FAIL
ARGON2_DECODING_LENGTH_FAIL
ARGON2_DEFAULT_FLAGS

Flags to determine which fields are securely wiped (default = no wipe).

ARGON2_ENCODING_FAIL
ARGON2_FLAG_CLEAR_PASSWORD
ARGON2_FLAG_CLEAR_SECRET
ARGON2_FREE_MEMORY_CBK_NULL
ARGON2_INCORRECT_PARAMETER
ARGON2_INCORRECT_TYPE
ARGON2_LANES_TOO_FEW
ARGON2_LANES_TOO_MANY
ARGON2_MAX_AD_LENGTH

Maximum associated data length in bytes

ARGON2_MAX_LANES

Maximum number of lanes (degree of parallelism)

ARGON2_MAX_MEMORY

Maximum number of memory blocks (each of BLOCK_SIZE bytes)

ARGON2_MAX_OUTLEN

Maximum digest size in bytes

ARGON2_MAX_PWD_LENGTH

Maximum password length in bytes

ARGON2_MAX_SALT_LENGTH

Maximum salt length in bytes

ARGON2_MAX_SECRET

Maximum key length in bytes

ARGON2_MAX_THREADS

Maximum number of threads

ARGON2_MAX_TIME

Maximum number of passes

ARGON2_MEMORY_ALLOCATION_ERROR
ARGON2_MEMORY_TOO_LITTLE
ARGON2_MEMORY_TOO_MUCH
ARGON2_MIN_AD_LENGTH

Minimum associated data length in bytes

ARGON2_MIN_LANES

Minimum number of lanes (degree of parallelism)

ARGON2_MIN_MEMORY

Minimum number of memory blocks (each of BLOCK_SIZE bytes)

ARGON2_MIN_OUTLEN

Minimum digest size in bytes

ARGON2_MIN_PWD_LENGTH

Minimum password length in bytes

ARGON2_MIN_SALT_LENGTH

Minimum salt length in bytes

ARGON2_MIN_SECRET

Minimum key length in bytes

ARGON2_MIN_THREADS

Minimum number of threads

ARGON2_MIN_TIME

Minimum number of passes

ARGON2_MISSING_ARGS
ARGON2_OK
ARGON2_OUTPUT_PTR_NULL
ARGON2_OUTPUT_TOO_LONG
ARGON2_OUTPUT_TOO_SHORT
ARGON2_OUT_PTR_MISMATCH
ARGON2_PWD_PTR_MISMATCH
ARGON2_PWD_TOO_LONG
ARGON2_PWD_TOO_SHORT
ARGON2_SALT_PTR_MISMATCH
ARGON2_SALT_TOO_LONG
ARGON2_SALT_TOO_SHORT
ARGON2_SECRET_PTR_MISMATCH
ARGON2_SECRET_TOO_LONG
ARGON2_SECRET_TOO_SHORT
ARGON2_SYNC_POINTS

Number of synchronization points between lanes per pass

ARGON2_THREADS_TOO_FEW
ARGON2_THREADS_TOO_MANY
ARGON2_THREAD_FAIL
ARGON2_TIME_TOO_LARGE
ARGON2_TIME_TOO_SMALL
ARGON2_VERIFY_MISMATCH
ARGON2_VERSION_10
ARGON2_VERSION_13
ARGON2_VERSION_NUMBER
Argon2_d
Argon2_i
Argon2_id

Functions

argon2_ctx

Function that performs memory-hard hashing with certain degree of parallelism

argon2_encodedlen

Returns the encoded hash length for the given input parameters

argon2_error_message

Get the associated error message for given error code

argon2_hash
argon2_type2string

Function that gives the string representation of an argon2_type.

argon2_verify
argon2_verify_ctx
argon2d_ctx

Argon2d: Version of Argon2 that picks memory blocks depending on the password and salt. Only for side-channel-free environment!!

argon2d_hash_encoded
argon2d_hash_raw
argon2d_verify
argon2d_verify_ctx

Verify if a given password is correct for Argon2d hashing

argon2i_ctx

Argon2i: Version of Argon2 that picks memory blocks independent on the password and salt. Good for side-channels, but worse w.r.t. tradeoff attacks if only one pass is used.

argon2i_hash_encoded

Hashes a password with Argon2i, producing an encoded hash

argon2i_hash_raw

Hashes a password with Argon2i, producing a raw hash at @hash

argon2i_verify

Verifies a password against an encoded string

argon2i_verify_ctx

Verify if a given password is correct for Argon2i hashing @param context Pointer to current Argon2 context

argon2id_ctx

Argon2id: Version of Argon2 where the first half-pass over memory is password-independent, the rest are password-dependent (on the password and salt). OK against side channels (they reduce to 1/2-pass Argon2i), and better with w.r.t. tradeoff attacks (similar to Argon2d).

argon2id_hash_encoded
argon2id_hash_raw
argon2id_verify
argon2id_verify_ctx

Verify if a given password is correct for Argon2id hashing

Type Definitions

Argon2_ErrorCodes
Argon2_type
Argon2_version
allocate_fptr
argon2_context
deallocate_fptr