Enum argonautica::ErrorKind[][src]

pub enum ErrorKind {
    AdditionalDataTooLongError,
    BackendEncodeError,
    BackendUnsupportedError,
    Base64DecodeError,
    Bug,
    HashDecodeError,
    HashLenTooShortError,
    HashMissingError,
    IterationsTooFewError,
    LanesTooFewError,
    LanesTooManyError,
    MemoryAllocationError,
    MemorySizeInvalidError,
    MemorySizeTooSmallError,
    OsRngError,
    PasswordImmutableError,
    PasswordMissingError,
    PasswordTooLongError,
    PasswordTooShortError,
    SaltTooLongError,
    SaltTooShortError,
    SecretKeyImmutableError,
    SecretKeyMissingError,
    SecretKeyTooLongError,
    ThreadError,
    ThreadsTooFewError,
    ThreadsTooManyError,
    Utf8EncodeError,
    VariantEncodeError,
    VersionEncodeError,
    // some variants omitted
}

Enum representing the various kinds of errors

Variants

Additional data too long. Length in bytes must be less than 2^32

Backend encode error. u32 provided could not be encoded into a Backend

Rust backend not yet supported. Please use the C backend

Base64 decode error. Bytes provided were invalid base64

This is a bug in the argonautica crate and should be unreachable. Please file an issue

Hash decode error. Hash provided was invalid

Hash length too short. Hash length must be at least 4

Hash missing. Attempted to verify without first having provided a hash

Iterations too few. Iterations must be greater than 0

Lanes too few. Lanes must be greater than 0

Lanes too many. Lanes must be less than 2^24

C code attempted to allocate memory (using malloc) and failed

Memory size invalid. Memory size must be a power of two

Memory size too small. Memory size must be at least 8 times the number of lanes

Failed to access OS random number generator

Password immutable error. You attempted to hash or verify with an immutable password and password_clearing set to true, which is not possible because with an immutable password argonautica cannot zero out the password bytes. To prevent this error, either pass Hasher or Verifier a mutable password or set password_clearing to false

Password missing. Attempted to verify without first having provided a password

Password too long. Length in bytes must be less than 2^32

Password too short. Length in bytes must be greater than 0

Salt too long. Length in bytes must be less than 2^32

Salt too short. Length in bytes must be at least 8

Secret key immutable error. You attempted to hash or verify with an immutable secret key and secret_key_clearing set to true, which is not possible because with an immutable secret key argonautica cannot zero out the secret key bytes. To prevent this error, either pass Hasher or Verifier a mutable secret key or set secret_key_clearing to false

Secret key missing. Attempted to hash without a secret key without having first opted out of using a secret key

Secret key too long. Length in bytes must be less than 2^32

C code reported a "Threading failure" error

Threads too few. Threads must be greater than 0

Threads too many. Threads must be less than 2^24

Utf-8 encode error. Bytes provided could not be encoded into utf-8

Variant encode error. &str provided could not be encoded into a Variant

Version encode error. &str or u32 provided could not be encoded into a Version

Trait Implementations

impl From<ErrorKind> for Error
[src]

Performs the conversion.

impl Fail for ErrorKind
[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Returns a iterator over the causes of this Fail with itself as the first item and the root_cause as the final item. Read more

Returns the "root cause" of this Fail - the last value in the cause chain which does not return an underlying cause. Read more

impl Display for ErrorKind
[src]

Formats the value using the given formatter. Read more

impl Copy for ErrorKind
[src]

impl Clone for ErrorKind
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ErrorKind
[src]

Formats the value using the given formatter. Read more

impl Eq for ErrorKind
[src]

impl PartialEq for ErrorKind
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for ErrorKind
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for ErrorKind
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for ErrorKind
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for ErrorKind

impl Sync for ErrorKind