libQuotient
A Qt library for building matrix clients
|
Non-template base for owning byte span classes. More...
#include <e2ee_common.h>
Public Types | |
enum | InitOptions { Uninitialized , FillWithZeros , FillWithRandom } |
using | value_type = byte_t |
using | size_type = size_t |
Public Member Functions | |
auto | size () const |
auto | empty () const |
void | clear () |
QByteArray | viewAsByteArray () const |
Access the bytes of the fixed buffer via QByteArray interface. | |
QByteArray | copyToByteArray (QByteArray::size_type untilPos=-1) const |
Copy the contents of the buffer to a QByteArray. | |
QByteArray | toBase64 () const |
QByteArray | toBase64 (QByteArray::Base64Options options) const |
FixedBufferBase & | operator= (FixedBufferBase &&)=delete |
Static Public Attributes | |
static constexpr auto | TotalSecureHeapSize = 65'536 |
Protected Member Functions | |
FixedBufferBase (size_type bufferSize, InitOptions options) | |
~FixedBufferBase () | |
FixedBufferBase (FixedBufferBase &&other) | |
void | fillFrom (QByteArray &&source) |
value_type * | dataForWriting () |
const value_type * | data () const |
Non-template base for owning byte span classes.
Definition at line 142 of file e2ee_common.h.
Definition at line 147 of file e2ee_common.h.
Definition at line 146 of file e2ee_common.h.
Enumerator | |
---|---|
Uninitialized | |
FillWithZeros | |
FillWithRandom |
Definition at line 144 of file e2ee_common.h.
|
protected |
|
inlineprotected |
Definition at line 194 of file e2ee_common.h.
|
inlineprotected |
Definition at line 196 of file e2ee_common.h.
void Quotient::FixedBufferBase::clear | ( | ) |
|
inline |
Copy the contents of the buffer to a QByteArray.
Unlike viewAsByteArray(), this function actually copies the buffer to non-secure memory.
Definition at line 176 of file e2ee_common.h.
|
inlineprotected |
Definition at line 203 of file e2ee_common.h.
|
inlineprotected |
Definition at line 202 of file e2ee_common.h.
|
inline |
Definition at line 152 of file e2ee_common.h.
|
protected |
|
delete |
|
inline |
Definition at line 151 of file e2ee_common.h.
|
inline |
Definition at line 183 of file e2ee_common.h.
|
inline |
Definition at line 184 of file e2ee_common.h.
|
inline |
Access the bytes of the fixed buffer via QByteArray interface.
This uses QByteArray::fromRawData() to create a QByteArray object that refers to the original fixed buffer, without copying.
Definition at line 165 of file e2ee_common.h.
Definition at line 149 of file e2ee_common.h.