Changes to be committed:
modified: src/server.rs
This commit is contained in:
parent
475ef4ec6d
commit
9f429449f5
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user