use be for nonce bytes

This commit is contained in:
kozabrada123 2024-04-16 15:55:54 +02:00
parent b94c89d760
commit 7cbb3eca29
1 changed files with 2 additions and 2 deletions

View File

@ -151,8 +151,8 @@ impl UdpHandle {
data_lock.last_udp_encryption_nonce = Some(nonce); data_lock.last_udp_encryption_nonce = Some(nonce);
drop(data_lock); drop(data_lock);
// TODO: Is le correct? This is not documented anywhere // TODO: Is big endian correct? This is not documented anywhere
let mut bytes = nonce.to_le_bytes().to_vec(); let mut bytes = nonce.to_be_bytes().to_vec();
// This is 4 bytes, it has to be a different size, appends 0s // This is 4 bytes, it has to be a different size, appends 0s
while bytes.len() < 24 { while bytes.len() < 24 {