From 46e9bb58dd8577e61aa3db0b8f6b5d27e1841d98 Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Thu, 6 Jun 2024 02:43:44 +0400 Subject: [PATCH] cipher: fix documentation for decrypt traits --- cipher/src/block.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cipher/src/block.rs b/cipher/src/block.rs index bc0ac183..fd69bf57 100644 --- a/cipher/src/block.rs +++ b/cipher/src/block.rs @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`. @@ -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`.