Skip to content

Commit

Permalink
more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
keks committed Feb 1, 2024
1 parent 5959b1b commit bb9ca90
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/aead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::hacl::chacha20_poly1305;

use libcrux_platform::{aes_ni_support, simd128_support, simd256_support};

/// The caller has provided an invalid argument.
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum InvalidArgumentError {
/// An provided algorithm is not supported.
Expand All @@ -31,7 +32,7 @@ pub enum InvalidArgumentError {
/// The provided IV is invalid.
InvalidIv,

/// An unknown argument is invalid. Returned when another library reports an invalid argument.
/// An unknown argument is invalid.
Unknown,
}

Expand All @@ -52,6 +53,7 @@ impl core::fmt::Display for InvalidArgumentError {
pub enum EncryptError {
/// An error occurred because the provided arguments were not valid.
/// The inner error can be one of the variants [`InvalidArgumentError::UnsupportedAlgorithm`] and [`InvalidArgumentError::Unknown`].
/// The latter can be returned e.g. when the provided message is too long.
InvalidArgument(InvalidArgumentError),

/// An internal error occurred.
Expand Down

0 comments on commit bb9ca90

Please sign in to comment.