pub enum Error {
    HpkeInvalidOutputLength,
    UnknownKdfAlgorithm,
    KemInvalidSecretKey,
    KemInvalidPublicKey,
    UnknownKemAlgorithm,
    UnknownAeadAlgorithm,
    AeadInvalidNonce,
    AeadOpenError,
    AeadInvalidCiphertext,
    InsufficientRandomness,
    CryptoLibraryError(String),
}
Expand description

Errors thrown by crate::HpkeCrypto trait implementations.

Variants

HpkeInvalidOutputLength

The output length is invalid (too large).

UnknownKdfAlgorithm

Unknown or unsupported KDF algorithm.

KemInvalidSecretKey

Invalid secret key for the KEM.

KemInvalidPublicKey

Invalid public key for the KEM.

UnknownKemAlgorithm

Unknown or unsupported KEM algorithm,

UnknownAeadAlgorithm

Unknown or unsupported AEAD algorithm.

AeadInvalidNonce

Invalid nonce for the AEAD algorithm.

AeadOpenError

Error opening an AEAD cipher text.

AeadInvalidCiphertext

Invalid cipher text for the AEAD algorithm.

InsufficientRandomness

Insufficient randomness to perform the operation.

CryptoLibraryError(String)

A crypto library error.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.