Skip to content

Commit

Permalink
Fix doctests (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Feb 18, 2022
1 parent 6cf9bd2 commit f42aae7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
7 changes: 3 additions & 4 deletions cbc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//!
//! # Example
//! ```
//! # #[cfg(feature = "block-padding")] {
//! use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! use hex_literal::hex;
//!
Expand Down Expand Up @@ -54,15 +55,13 @@
//! .decrypt_padded_b2b_mut::<Pkcs7>(&ct, &mut buf)
//! .unwrap();
//! assert_eq!(pt, &plaintext);
//! # }
//! ```
//!
//! With enabled `alloc` (or `std`) feature you also can use allocating
//! convinience methods:
//! ```
//! # #[cfg(not(feature = "alloc"))]
//! # fn main() { }
//! # #[cfg(feature = "alloc")]
//! # fn main() {
//! # #[cfg(all(feature = "alloc", feature = "block-padding"))] {
//! # use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! # use hex_literal::hex;
//! # type Aes128CbcEnc = cbc::Encryptor<aes::Aes128>;
Expand Down
7 changes: 3 additions & 4 deletions ige/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//!
//! # Example
//! ```
//! # #[cfg(feature = "block-padding")] {
//! use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! use hex_literal::hex;
//!
Expand Down Expand Up @@ -54,15 +55,13 @@
//! .decrypt_padded_b2b_mut::<Pkcs7>(&ct, &mut buf)
//! .unwrap();
//! assert_eq!(pt, &plaintext);
//! # }
//! ```
//!
//! With enabled `alloc` (or `std`) feature you also can use allocating
//! convinience methods:
//! ```
//! # #[cfg(not(feature = "alloc"))]
//! # fn main() { }
//! # #[cfg(feature = "alloc")]
//! # fn main() {
//! # #[cfg(all(feature = "alloc", feature = "block-padding"))] {
//! # use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! # use hex_literal::hex;
//! # type Aes128IgeEnc = ige::Encryptor<aes::Aes128>;
Expand Down
7 changes: 3 additions & 4 deletions pcbc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//!
//! # Example
//! ```
//! # #[cfg(feature = "block-padding")] {
//! use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! use hex_literal::hex;
//!
Expand Down Expand Up @@ -54,15 +55,13 @@
//! .decrypt_padded_b2b_mut::<Pkcs7>(&ct, &mut buf)
//! .unwrap();
//! assert_eq!(pt, &plaintext);
//! # }
//! ```
//!
//! With enabled `alloc` (or `std`) feature you also can use allocating
//! convinience methods:
//! ```
//! # #[cfg(not(feature = "alloc"))]
//! # fn main() { }
//! # #[cfg(feature = "alloc")]
//! # fn main() {
//! # #[cfg(all(feature = "alloc", feature = "block-padding"))] {
//! # use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
//! # use hex_literal::hex;
//! # type Aes128PcbcEnc = pcbc::Encryptor<aes::Aes128>;
Expand Down

0 comments on commit f42aae7

Please sign in to comment.