Move doc details into another paragraph

This commit is contained in:
BrianOn99 2017-10-09 11:14:27 +08:00
parent ff53750cab
commit 75e6db6f00
1 changed files with 18 additions and 11 deletions

View File

@ -36,8 +36,9 @@ pub enum Mode {
Decrypt, Decrypt,
} }
/// Represent a particular cipher algorithm. See OpenSSL doc at [`EVP_EncryptInit`] for more /// Represents a particular cipher algorithm.
/// information on each algorithms. ///
/// See OpenSSL doc at [`EVP_EncryptInit`] for more information on each algorithms.
/// ///
/// [`EVP_EncryptInit`]: https://www.openssl.org/docs/man1.1.0/crypto/EVP_EncryptInit.html /// [`EVP_EncryptInit`]: https://www.openssl.org/docs/man1.1.0/crypto/EVP_EncryptInit.html
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -180,7 +181,9 @@ impl Cipher {
} }
} }
/// Represents a symmetric cipher context. Padding is enabled by default. /// Represents a symmetric cipher context.
///
/// Padding is enabled by default.
/// ///
/// # Examples /// # Examples
/// ///
@ -445,11 +448,13 @@ impl Drop for Crypter {
} }
} }
/// A convenient interface to `Crypter` to encrypt data, using the specified crypter type `t` in /// Encrypts data in one go, and returns the encrypted data.
/// encrypt mode with the specified key and iv; returns the resulting (encrypted) data.
/// ///
/// This function encrypts all data in one go. To encrypt a stream of data increamentally , use /// Data is encrypted using the specified cipher type `t` in encrypt mode with the specified `key`
/// `Crypter` instead. /// and initailization vector `iv`.
///
/// This is a convenient interface to `Crypter` to encrypt all data in one go. To encrypt a stream
/// of data increamentally , use `Crypter` instead.
/// ///
/// # Examples /// # Examples
/// ///
@ -482,11 +487,13 @@ pub fn encrypt(
cipher(t, Mode::Encrypt, key, iv, data) cipher(t, Mode::Encrypt, key, iv, data)
} }
/// A convenient interface to `Crypter` to decrypt data, using the specified crypter type `t` in /// Decrypts data in one go, and returns the decrypted data.
/// decrypt mode with the specified key and iv; returns the resulting (decrypted) data.
/// ///
/// This function decrypts all data in one go. To decrypt a stream of data increamentally, use /// Data is decrypted using the specified cipher type `t` in decrypt mode with the specified `key`
/// `Crypter` instead. /// and initailization vector `iv`.
///
/// This is a convenient interface to `Crypter` to decrypt all data in one go. To decrypt a stream
/// of data increamentally , use `Crypter` instead.
/// ///
/// # Examples /// # Examples
/// ///