| 69 | } |
| 70 | |
| 71 | void ClientProperties::decryptBatch() { |
| 72 | if (_keys.get(_parity) != nullptr) { |
| 73 | // terminate batch buffer |
| 74 | setBatchData(nullptr, 0, _parity, nullptr); |
| 75 | // decrypt it |
| 76 | dvbcsa_bs_decrypt(_keys.get(_parity), _batch, 184); |
| 77 | |
| 78 | // clear scramble flags, so we can send it. |
| 79 | unsigned int i = 0; |
| 80 | while (_ts[i].data != nullptr) { |
| 81 | _ts[i].data[3] &= 0x3F; |
| 82 | ++i; |
| 83 | } |
| 84 | } else { |
| 85 | unsigned int i = 0; |
| 86 | while (_ts[i].data != nullptr) { |
| 87 | // set decrypt failed by setting NULL packet ID.. |
| 88 | _ts[i].data[1] |= 0x1F; |
| 89 | _ts[i].data[2] |= 0xFF; |
| 90 | |
| 91 | // clear scramble flag, so we can send it. |
| 92 | _ts[i].data[3] &= 0x3F; |
| 93 | ++i; |
| 94 | } |
| 95 | } |
| 96 | // decrypted this batch reset counter |
| 97 | _batchCount = 0; |
| 98 | } |
| 99 | |
| 100 | void ClientProperties::setECMInfo( |
| 101 | int UNUSED(pid), |