TSDuck v3.40-3963
MPEG Transport Stream Toolkit
|
Counter (CTR) chaining mode. More...
#include <tsCTR.h>
Public Member Functions | |
CTR (size_t counter_bits=0) | |
Constructor. | |
size_t | counterBits () const |
Get the size of the counter part in the IV. | |
void | setCounterBits (size_t counter_bits) |
Set the size of the counter part in the IV. | |
Static Protected Member Functions | |
static const BlockCipherProperties & | PROPERTIES () |
Properties of this algorithm. | |
Counter (CTR) chaining mode.
CTR can process a residue. The plain text and cipher text can have any size.
CIPHER | A subclass of ts::BlockCipher, the underlying block cipher. |
ts::CTR< CIPHER, >::CTR | ( | size_t | counter_bits = 0 | ) |
Constructor.
[in] | counter_bits | Number of bits of the counter part in the IV. See setCounterBits() for an explanation of this value. |
void ts::CTR< CIPHER, >::setCounterBits | ( | size_t | counter_bits | ) |
Set the size of the counter part in the IV.
[in] | counter_bits | Number of bits of the counter part in the IV. In CTR mode, the IV is considered as an integer in big-endian representation. The counter part of the IV uses the least significant bits of the IV. The default value (when specified as zero) is half the size of the IV. |
|
inline |
Get the size of the counter part in the IV.
|
inlinestaticprotected |
Properties of this algorithm.