#[non_exhaustive]pub enum CipherAlgorithm {
Aes,
Rc4,
}Expand description
The cipher a file names for its payload.
Reported as Option<CipherAlgorithm>: None means the attribute or field was
absent, or named something this crate does not recognise. A classifier that
invented a value for either case would be worse than one that says “I could not
tell”.
§Examples
use msoffice_crypto::{classify, CipherAlgorithm};
let class = classify(include_bytes!("../tests/fixtures/agile_encrypted.docx"));
assert_eq!(class.key_data.unwrap().cipher, Some(CipherAlgorithm::Aes));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Aes
Agile cipherAlgorithm="AES", or a standard-encryption header with fAES set
or an AlgID in the AES range.
Rc4
RC4 — AlgID = 0x00006801 with fAES clear ([MS-OFFCRYPTO] §2.3.2).
Trait Implementations§
Source§impl Clone for CipherAlgorithm
impl Clone for CipherAlgorithm
impl Copy for CipherAlgorithm
Source§impl Debug for CipherAlgorithm
impl Debug for CipherAlgorithm
impl Eq for CipherAlgorithm
Source§impl PartialEq for CipherAlgorithm
impl PartialEq for CipherAlgorithm
impl StructuralPartialEq for CipherAlgorithm
Auto Trait Implementations§
impl Forget for CipherAlgorithm
impl Freeze for CipherAlgorithm
impl Move for CipherAlgorithm
impl RefUnwindSafe for CipherAlgorithm
impl Send for CipherAlgorithm
impl Sync for CipherAlgorithm
impl Unpin for CipherAlgorithm
impl UnsafeUnpin for CipherAlgorithm
impl UnwindSafe for CipherAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more