generate full nonce

This commit is contained in:
Nunu 2024-01-24 10:56:51 +01:00
parent 0b3785b644
commit 155fbc5da0

View File

@ -561,7 +561,8 @@ void MSG_SendPacket(union DataPacket packet) {
if(packet.unencrypted.header == ENCRYPTED_MESSAGE_PACKET){
char nonce[NONCE_LENGTH];
CRYPTO_Random(nonce, NONCE_LENGTH-1);
CRYPTO_Random(nonce, NONCE_LENGTH);
// this is wat happens when we have global state
memcpy(packet.encrypted.nonce, nonce, NONCE_LENGTH);