Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cipher: fix documentation for decrypt traits #1587

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cipher/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub trait BlockCipherDecrypt: BlockSizeUser {
.map(|blocks| self.decrypt_with_backend(BlocksCtx { blocks }))
}

/// Decrypt input and unpad it. Returns resulting ciphertext slice.
/// Decrypt input and unpad it. Returns resulting plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -258,7 +258,7 @@ pub trait BlockCipherDecrypt: BlockSizeUser {
P::unpad_blocks(blocks.into_out())
}

/// Decrypt input and unpad it in-place. Returns resulting ciphertext slice.
/// Decrypt input and unpad it in-place. Returns resulting plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -272,7 +272,7 @@ pub trait BlockCipherDecrypt: BlockSizeUser {
}

/// Decrypt input and unpad it buffer-to-buffer. Returns resulting
/// ciphertext slice.
/// plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -293,7 +293,7 @@ pub trait BlockCipherDecrypt: BlockSizeUser {
}

/// Decrypt input and unpad it in a newly allocated Vec. Returns resulting
/// ciphertext Vec.
/// plaintext `Vec`.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand Down Expand Up @@ -481,7 +481,7 @@ pub trait BlockModeDecrypt: BlockSizeUser + Sized {
.map(|blocks| self.decrypt_with_backend(BlocksCtx { blocks }))
}

/// Decrypt input and unpad it. Returns resulting ciphertext slice.
/// Decrypt input and unpad it. Returns resulting plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -499,7 +499,7 @@ pub trait BlockModeDecrypt: BlockSizeUser + Sized {
P::unpad_blocks(blocks.into_out())
}

/// Decrypt input and unpad it in-place. Returns resulting ciphertext slice.
/// Decrypt input and unpad it in-place. Returns resulting plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -513,7 +513,7 @@ pub trait BlockModeDecrypt: BlockSizeUser + Sized {
}

/// Decrypt input and unpad it buffer-to-buffer. Returns resulting
/// ciphertext slice.
/// plaintext slice.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand All @@ -534,7 +534,7 @@ pub trait BlockModeDecrypt: BlockSizeUser + Sized {
}

/// Decrypt input and unpad it in a newly allocated Vec. Returns resulting
/// ciphertext Vec.
/// plaintext `Vec`.
///
/// Returns [`UnpadError`] if padding is malformed or if input length is
/// not multiple of `Self::BlockSize`.
Expand Down
Loading