Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Fix for tpl_num_encr_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
SzczepanLeon authored Jan 17, 2024
1 parent b2bae46 commit 52ec461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool decrypt_TPL_AES_CBC_IV(std::vector<unsigned char> &frame,
std::vector<unsigned char> buffer;
buffer.insert(buffer.end(), pos, frame.end());
size_t num_bytes_to_decrypt = frame.end()-pos;
uint8_t tpl_num_encr_blocks = 3; //t->tpl_num_encr_blocks
uint8_t tpl_num_encr_blocks = ((uint8_t)frame[13] >> 4) & 0x0f;

if (tpl_num_encr_blocks) {
num_bytes_to_decrypt = tpl_num_encr_blocks*16;
Expand Down Expand Up @@ -93,4 +93,4 @@ bool decrypt_TPL_AES_CBC_IV(std::vector<unsigned char> &frame,
frame.insert(frame.end(), buffer.begin()+num_bytes_to_decrypt, buffer.end());
}
return true;
}
}

0 comments on commit 52ec461

Please sign in to comment.