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 necessarily data secrecy. The purpose is to store malware on disk without upsetting anti-virus systems. It would be annoying if security software deleted our carefully curated data!
Variants§
AES128(Vec<u8>)
AES-128, to protect from prying eyes.
RC4(Vec<u8>)
RC4 with a 16-byte key, to protect from anti-virus
Xor(Vec<u8>)
Exclusive OR, to protect from anti-virus
Implementations§
source§impl FileEncryption
impl FileEncryption
pub fn new(option: EncryptionOption, bytes: Vec<u8>) -> Result<Self>
pub fn name(&self) -> &'static str
pub fn key(&self) -> &[u8] ⓘ
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§
source§impl From<EncryptionOption> for FileEncryption
impl From<EncryptionOption> for FileEncryption
source§fn from(option: EncryptionOption) -> Self
fn from(option: EncryptionOption) -> Self
Converts to this type from the input type.
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