mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-22 19:18:56 +00:00
generate full nonce
This commit is contained in:
parent
0b3785b644
commit
155fbc5da0
@ -561,7 +561,8 @@ void MSG_SendPacket(union DataPacket packet) {
|
|||||||
|
|
||||||
if(packet.unencrypted.header == ENCRYPTED_MESSAGE_PACKET){
|
if(packet.unencrypted.header == ENCRYPTED_MESSAGE_PACKET){
|
||||||
char nonce[NONCE_LENGTH];
|
char nonce[NONCE_LENGTH];
|
||||||
CRYPTO_Random(nonce, NONCE_LENGTH-1);
|
|
||||||
|
CRYPTO_Random(nonce, NONCE_LENGTH);
|
||||||
// this is wat happens when we have global state
|
// this is wat happens when we have global state
|
||||||
memcpy(packet.encrypted.nonce, nonce, NONCE_LENGTH);
|
memcpy(packet.encrypted.nonce, nonce, NONCE_LENGTH);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user