Enum malwaredb_server::crypto::FileEncryption
source · pub enum FileEncryption {
AES128(Vec<u8>),
RC4(Vec<u8>),
Xor(Vec<u8>),
}
Expand description
Some of these algorithms are not secure, and that’s fine, since the goal isn’t true data secrecy. The purpose is to store malware on disk without upsetting anti-virus systems.
Variants§
Implementations§
source§impl FileEncryption
impl FileEncryption
pub fn new(name: &str, bytes: Vec<u8>) -> Result<Self>
pub fn name(&self) -> &'static str
pub fn key(&self) -> &[u8] ⓘ
pub fn random(name: &str) -> Result<Self>
pub fn decrypt(&self, data: &[u8], nonce: Option<Vec<u8>>) -> Result<Vec<u8>>
pub fn encrypt(&self, data: &[u8], nonce: Option<Vec<u8>>) -> Result<Vec<u8>>
pub fn nonce(&self) -> Option<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileEncryption
impl RefUnwindSafe for FileEncryption
impl Send for FileEncryption
impl Sync for FileEncryption
impl Unpin for FileEncryption
impl UnwindSafe for FileEncryption
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