mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-01-16 16:21:02 +00:00
Send the frame number in the encrypted video header
This commit is contained in:
parent
65851407b1
commit
9dfe97d405
@ -128,7 +128,7 @@ namespace stream {
|
||||
}
|
||||
|
||||
std::uint8_t iv[12]; // 12-byte IV is ideal for AES-GCM
|
||||
std::uint32_t unused;
|
||||
std::uint32_t frameNumber;
|
||||
std::uint8_t tag[16];
|
||||
};
|
||||
|
||||
@ -1419,7 +1419,7 @@ namespace stream {
|
||||
|
||||
// Encrypt the target buffer in place
|
||||
auto *prefix = (video_packet_enc_prefix_t *) shards.prefix(x);
|
||||
prefix->unused = 0;
|
||||
prefix->frameNumber = packet->frame_index();
|
||||
std::copy(std::begin(iv), std::end(iv), prefix->iv);
|
||||
session->video.cipher->encrypt(std::string_view { (char *) inspect, (size_t) blocksize }, prefix->tag, &iv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user