MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Block of aligned 128 bit / 16 B. More...
#include <block.h>
Public Member Functions | |
Block128 () | |
Block128 (const Block128 &other) | |
Block128 (Block128 &&other) | |
Block128 & | operator= (const Block128 &other) |
Block128 & | operator= (Block128 &&other) |
~Block128 ()=default | |
bool | operator== (const Block128 &other) const |
Compares two Block128 for equality. More... | |
bool | operator!= (const Block128 &other) const |
Compares two Block128 for inequality. More... | |
Block128 & | operator^= (const Block128 &__restrict__ other) |
Performs XOR-assign operation between two Block128. More... | |
Block128 | operator^ (const Block128 &other) const |
Performs XOR operation between two Block128. More... | |
Block128 & | operator^= (const std::byte *__restrict__ other) |
Performs XOR-assign operation between this Block128 and a non-overlapping arbitrary range of bytes. More... | |
Block128 | operator^ (const std::byte *__restrict__ other) const |
Performs XOR operation between this Block128 and a non-overlapping arbitrary range of bytes. More... | |
void | SetToZero () |
Set this Block128 to zero. More... | |
void | SetToRandom () |
Set this Block128 to a random value. More... | |
void | LoadFromMemory (const std::byte *pointer) |
Put 16 bytes starting at pointer into this Block128. More... | |
std::string | AsString () const |
Format this Block128 as string of hexadecimal digits. More... | |
std::byte * | data () |
Get a pointer to the beginning of this Block128. More... | |
const std::byte * | data () const |
Static Public Member Functions | |
static Block128 | MakeZero () |
Create a zero-initialized Block128. More... | |
static Block128 | MakeRandom () |
Create a random-initialized Block128. More... | |
static Block128 | MakeFromMemory (const std::byte *pointer) |
Load data from memory and store it in Block128. More... | |
static constexpr std::size_t | size () |
Get size of Block128. More... | |
static constexpr std::size_t | alignment () |
Get alignment of Block128. More... | |
Public Attributes | |
std::array< std::byte, 16 > | byte_array |
Static Public Attributes | |
static constexpr std::size_t | kBlockSize = 16 |
static constexpr std::size_t | kBlockAlignment = 16 |
Block of aligned 128 bit / 16 B.
|
inline |
|
inline |
|
inline |
|
default |
|
inlinestaticconstexpr |
Get alignment of Block128.
std::string encrypto::motion::Block128::AsString | ( | ) | const |
Format this Block128 as string of hexadecimal digits.
|
inline |
|
inline |
|
inline |
Put 16 bytes starting at pointer
into this Block128.
pointer |
|
inlinestatic |
Load data from memory and store it in Block128.
pointer | Pointer to the data to be loaded. |
|
inlinestatic |
Create a random-initialized Block128.
|
inlinestatic |
Create a zero-initialized Block128.
|
inline |
Compares two Block128 for inequality.
other |
|
inline |
Compares two Block128 for equality.
other |
Performs XOR operation between two Block128.
other |
|
inline |
Performs XOR operation between this Block128 and a non-overlapping arbitrary range of bytes.
other |
Performs XOR-assign operation between two Block128.
other |
|
inline |
Performs XOR-assign operation between this Block128 and a non-overlapping arbitrary range of bytes.
other |
void encrypto::motion::Block128::SetToRandom | ( | ) |
Set this Block128 to a random value.
|
inline |
|
inlinestaticconstexpr |
std::array<std::byte, 16> encrypto::motion::Block128::byte_array |
|
staticconstexpr |
|
staticconstexpr |