Lines Matching defs:cipher
10 //! let cipher = Cipher::aes_128_cbc();
15 //! cipher,
26 //! Encrypting an asymmetric key with a symmetric cipher
34 //! let cipher = Cipher::aes_256_cbc();
36 //! let privkey_pem = keypair.private_key_to_pem_passphrase(cipher, b"Rust").unwrap();
54 use crate::cipher::CipherRef;
67 /// Represents a particular cipher algorithm.
76 /// Looks up the cipher for a certain nid.
90 /// Returns the cipher's Nid.
362 /// Returns the length of keys used with this cipher.
368 /// Returns the length of the IV used with this cipher, or `None` if the
369 /// cipher does not use an IV.
382 /// Returns the block size of the cipher.
392 /// Determines whether the cipher is using CCM mode
404 /// Determines whether the cipher is using OCB mode
421 /// Represents a symmetric cipher context.
438 /// // Create a cipher context for encryption.
465 /// // Create a cipher context for decryption.
491 /// Panics if an IV is required by the cipher but not provided. Also make sure that the key
492 /// and IV size are appropriate for your cipher.
529 /// be a multiple of the cipher's block size.
536 /// When decrypting cipher text using an AEAD cipher, this must be called before `finalize`.
549 /// Feeds total plaintext length to the cipher.
551 /// The total plaintext or ciphertext length MUST be passed to the cipher when it operates in
557 /// Feeds Additional Authenticated Data (AAD) through the cipher.
567 /// Feeds data from `input` through the cipher, writing encrypted/decrypted
578 /// where `block_size` is the block size of the cipher (see `Cipher::block_size`).
595 /// where `block_size` is the block size of the cipher (see `Cipher::block_size`).
603 /// When encrypting data with an AEAD cipher, this must be called after `finalize`.
615 /// Data is encrypted using the specified cipher type `t` in encrypt mode with the specified `key`
628 /// let cipher = Cipher::aes_128_cbc();
633 /// cipher,
649 cipher(t, Mode::Encrypt, key, iv, data)
654 /// Data is decrypted using the specified cipher type `t` in decrypt mode with the specified `key`
667 /// let cipher = Cipher::aes_128_cbc();
673 /// cipher,
688 cipher(t, Mode::Decrypt, key, iv, data)
691 fn cipher(