#include <OTData.hpp>
Definition at line 143 of file OTData.hpp.
opentxs::OTData::OTData |
( |
| ) |
|
opentxs::OTData::OTData |
( |
const void * |
data, |
|
|
uint32_t |
size |
|
) |
| |
Definition at line 170 of file OTData.cpp.
EXPORT void Assign(const OTData &source)
opentxs::OTData::OTData |
( |
const OTData & |
source | ) |
|
Definition at line 152 of file OTData.cpp.
EXPORT void Assign(const OTData &source)
Definition at line 160 of file OTData.cpp.
165 if (source.Exists()) {
166 source.GetData(*
this);
opentxs::OTData::~OTData |
( |
| ) |
|
|
virtual |
Definition at line 178 of file OTData.cpp.
EXPORT void Release_Data()
void opentxs::OTData::Assign |
( |
const OTData & |
source | ) |
|
Definition at line 275 of file OTData.cpp.
278 if (&source ==
this) {
282 if (!source.IsEmpty()) {
283 Assign(source.data_, source.size_);
EXPORT void Assign(const OTData &source)
virtual EXPORT void Release()
void opentxs::OTData::Assign |
( |
const void * |
data, |
|
|
uint32_t |
size |
|
) |
| |
Definition at line 296 of file OTData.cpp.
301 if (data !=
nullptr && size > 0) {
302 data_ =
static_cast<void*
>(
new uint8_t[size]);
virtual EXPORT void Release()
static EXPORT void * safe_memcpy(void *dest, uint32_t dsize, const void *src, uint32_t ssize, bool zeroSource=false)
void opentxs::OTData::Concatenate |
( |
const void * |
data, |
|
|
uint32_t |
size |
|
) |
| |
Definition at line 333 of file OTData.cpp.
347 void* newData =
nullptr;
348 uint32_t newSize =
GetSize() + size;
351 newData =
static_cast<void*
>(
new uint8_t[newSize]);
356 if (newData !=
nullptr) {
367 newSize -
GetSize(), data, size);
370 if (data_ !=
nullptr) {
371 delete[]
static_cast<uint8_t*
>(data_);
EXPORT void Assign(const OTData &source)
EXPORT bool IsEmpty() const
static EXPORT void * safe_memcpy(void *dest, uint32_t dsize, const void *src, uint32_t ssize, bool zeroSource=false)
const void* opentxs::OTData::GetPointer |
( |
| ) |
const |
|
inline |
uint32_t opentxs::OTData::GetSize |
( |
| ) |
const |
|
inline |
void opentxs::OTData::Initialize |
( |
| ) |
|
|
inlineprotected |
bool opentxs::OTData::IsEmpty |
( |
| ) |
const |
bool opentxs::OTData::operator!= |
( |
const OTData & |
rhs | ) |
const |
Definition at line 202 of file OTData.cpp.
EXPORT bool operator==(const OTData &rhs) const
Definition at line 378 of file OTData.cpp.
380 if (rhs.GetSize() > 0) {
EXPORT void Concatenate(const void *data, uint32_t size)
Definition at line 262 of file OTData.cpp.
EXPORT void swap(OTData &rhs)
bool opentxs::OTData::operator== |
( |
const OTData & |
rhs | ) |
const |
Definition at line 183 of file OTData.cpp.
185 if (size_ != rhs.size_) {
189 if (size_ == 0 && rhs.size_ == 0) {
195 if (std::memcmp(data_, rhs.data_, size_) == 0) {
uint32_t opentxs::OTData::OTfread |
( |
uint8_t * |
data, |
|
|
uint32_t |
size |
|
) |
| |
Definition at line 214 of file OTData.cpp.
218 uint32_t sizeToRead = 0;
220 if (data_ !=
nullptr && position_ <
GetSize()) {
224 sizeToRead =
GetSize() - position_;
226 if (size < sizeToRead) {
230 static_cast<uint8_t*>(data_) + position_,
231 static_cast<uint32_t>(sizeToRead));
232 position_ += sizeToRead;
static EXPORT void * safe_memcpy(void *dest, uint32_t dsize, const void *src, uint32_t ssize, bool zeroSource=false)
bool opentxs::OTData::Randomize |
( |
uint32_t |
size | ) |
|
Definition at line 310 of file OTData.cpp.
314 data_ =
static_cast<void*
>(
new uint8_t[size]);
321 delete[]
static_cast<uint8_t*
>(data_);
static EXPORT bool randomizeMemory_uint8(uint8_t *destination, uint32_t size)
virtual EXPORT void Release()
void opentxs::OTData::Release |
( |
| ) |
|
|
virtual |
Definition at line 257 of file OTData.cpp.
EXPORT void Release_Data()
void opentxs::OTData::Release_Data |
( |
| ) |
|
Definition at line 245 of file OTData.cpp.
247 if (data_ !=
nullptr) {
251 delete[]
static_cast<uint8_t*
>(data_);
void opentxs::OTData::reset |
( |
| ) |
|
|
inline |
void opentxs::OTData::SetSize |
( |
uint32_t |
size | ) |
|
Definition at line 386 of file OTData.cpp.
391 data_ =
static_cast<void*
>(
new uint8_t[size]);
virtual EXPORT void Release()
void opentxs::OTData::swap |
( |
OTData & |
rhs | ) |
|
Definition at line 268 of file OTData.cpp.
270 std::swap(data_, rhs.data_);
271 std::swap(position_, rhs.position_);
272 std::swap(size_, rhs.size_);
void opentxs::OTData::zeroMemory |
( |
| ) |
const |
Definition at line 238 of file OTData.cpp.
240 if (data_ !=
nullptr) {
The documentation for this class was generated from the following files: