#include <scrambler.h>
|
| Scrambler () |
|
| ~Scrambler ()=default |
|
void | Scramble (void *scrambled, const void *to_scramble, size_t bytes_to_scramble) |
|
void | Scramble (void *inout_bytes, size_t bytes_to_scramble) |
|
void | Descramble (void *descrambled, const void *scrambled, size_t bytes_to_descramble) |
|
void | Descramble (void *inout_bytes, size_t bytes_to_descramble) |
|
|
static void | WlanScrambler (void *output_buffer, const void *input_buffer, size_t num_bytes, std::bitset< kScramblerlength > &scram_buffer, std::vector< std::byte > &bit_buffer) |
| WLAN Scrambler of IEEE 802.11-2012. More...
|
|
static void | ConvertBytesToBits (const std::byte *in_byte_buffer, size_t byte_buffer_size, std::byte *out_bit_buffer) |
| Convert a byte array to a bit array. MSB first. More...
|
|
static void | ConvertBitsToBytes (const std::byte *in_bit_buffer, size_t byte_buffer_size, std::byte *out_byte_buffer) |
| Convert a bit array to a byte array. MSB first. More...
|
|
◆ Scrambler()
AgoraScrambler::Scrambler::Scrambler |
( |
| ) |
|
◆ ~Scrambler()
AgoraScrambler::Scrambler::~Scrambler |
( |
| ) |
|
|
default |
◆ ConvertBitsToBytes()
void AgoraScrambler::Scrambler::ConvertBitsToBytes |
( |
const std::byte * |
in_bit_buffer, |
|
|
size_t |
byte_buffer_size, |
|
|
std::byte * |
out_byte_buffer |
|
) |
| |
|
staticprivate |
Convert a bit array to a byte array. MSB first.
- Parameters
-
in_bit_buffer | Input bit array |
byte_buffer_size | Output byte array size |
out_byte_buffer | Output byte array |
◆ ConvertBytesToBits()
void AgoraScrambler::Scrambler::ConvertBytesToBits |
( |
const std::byte * |
in_byte_buffer, |
|
|
size_t |
byte_buffer_size, |
|
|
std::byte * |
out_bit_buffer |
|
) |
| |
|
staticprivate |
Convert a byte array to a bit array. MSB first.
- Parameters
-
in_byte_buffer | Input byte array |
byte_buffer_size | Input byte array size |
out_bit_buffer | Output bit array |
◆ Descramble() [1/2]
void AgoraScrambler::Scrambler::Descramble |
( |
void * |
descrambled, |
|
|
const void * |
scrambled, |
|
|
size_t |
bytes_to_descramble |
|
) |
| |
◆ Descramble() [2/2]
void AgoraScrambler::Scrambler::Descramble |
( |
void * |
inout_bytes, |
|
|
size_t |
bytes_to_descramble |
|
) |
| |
◆ Scramble() [1/2]
void AgoraScrambler::Scrambler::Scramble |
( |
void * |
inout_bytes, |
|
|
size_t |
bytes_to_scramble |
|
) |
| |
◆ Scramble() [2/2]
void AgoraScrambler::Scrambler::Scramble |
( |
void * |
scrambled, |
|
|
const void * |
to_scramble, |
|
|
size_t |
bytes_to_scramble |
|
) |
| |
◆ WlanScrambler()
void AgoraScrambler::Scrambler::WlanScrambler |
( |
void * |
output_buffer, |
|
|
const void * |
input_buffer, |
|
|
size_t |
num_bytes, |
|
|
std::bitset< kScramblerlength > & |
scram_buffer, |
|
|
std::vector< std::byte > & |
bit_buffer |
|
) |
| |
|
staticprivate |
WLAN Scrambler of IEEE 802.11-2012.
Section 18.3.5.5. The same scrambler is used to both scramble bits at the transmitter and descramble at the receiver.
The input is scrambled with a length-127 frame-synchronous scrambler using the generator polynomial s(x) = x7 + x4 + 1 and a pseudorandom nonzero initial state (default 0x5D), which is an integer picked in the range [1,127]. The mapping of the seed to the generator is Bit0 ~ Bit6 to x1 ~ x7. The output is the scrambld data of the same size and type as the input.
- Parameters
-
output_buffer | Byte array for output scrambled data (can the the same as input) |
input_buffer | Byte array for input to be scrambled |
num_bytes | Byte array size - number of bytes to scramble / descramble |
scram_buffer | Scratch memory |
bit_buffer | Scratch memory |
◆ bit_buffer_
std::vector<std::byte> AgoraScrambler::Scrambler::bit_buffer_ |
|
private |
◆ scram_buffer_
The documentation for this class was generated from the following files: