Changes to be committed:

modified:   src/server.rs
This commit is contained in:
Michael Wain 2024-08-22 18:15:13 +03:00
parent 475ef4ec6d
commit 9f429449f5

View File

@ -73,6 +73,8 @@ pub async fn server_mode(server_config: ServerConfiguration) {
let aes = Aes256Gcm::new(&peer.shared_secret.into()); let aes = Aes256Gcm::new(&peer.shared_secret.into());
let nonce = Aes256Gcm::generate_nonce(&mut OsRng); let nonce = Aes256Gcm::generate_nonce(&mut OsRng);
info!("Key: {:?} / nonce: {:?}", &peer.shared_secret, &nonce);
let ciphered_data = aes.encrypt(&nonce, &buf[..n]); let ciphered_data = aes.encrypt(&nonce, &buf[..n]);
if let Ok(ciphered_d) = ciphered_data { if let Ok(ciphered_d) = ciphered_data {