Skip to main content

BlockDecryptor

Trait BlockDecryptor 

Source
pub trait BlockDecryptor: Send + Sync {
    // Required method
    fn decrypt(&self, block: &mut [u8], index: usize) -> Result<(), Error>;
}
Expand description

Decrypts one block in place before it is decoded (UnityCN: P3). UnityPy decrypts a block whose flags carry 0x100 and whose codec is not None, of a bundle whose header’s encryption flag built a decryptor (files/BundleFile.py:123-124, files/BundleFile.py:512-513); a bundle whose flag is clear is never decrypted, whatever the context holds.

Required Methods§

Source

fn decrypt(&self, block: &mut [u8], index: usize) -> Result<(), Error>

Decrypts block index in place.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§