#include <cel_blob.h>
List of all members.
Detailed Description
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
struct Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >
This template defines lightweight definition for Binary-Large-Object classes.
- Parameters:
-
| _SIZE | The byte size of the binary data. |
| NEED_SECURE_CLEANUP | Whether the destructor should zero-clear the instance or not. |
Member Enumeration Documentation
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
The size of the Blob in bytes.
Constructor & Destructor Documentation
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
Initializes the binary with all-0.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
Initializes the binary by copying the specified data.
- Parameters:
-
| inBin | Data to copy. The pointer should point a memory location which is longer than SIZE. Only the first SIZE bytes are copied. |
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::Blob |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
[inline] |
Duplicates the specified blob.
- Parameters:
-
| inBin | A Blob instance to be duplicated. |
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
Member Function Documentation
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| int Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::compare |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
- 0 if both instances are identical. Negative value if this instance is smaller than the other.
Positive value if this instance is larger than the other.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| size_t Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::getSize |
( |
|
) |
const [inline] |
Returns the size of binary.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::isAllZero |
( |
|
) |
const [inline] |
Determine whether the binary is all-0 or not.
- Returns:
true if all the bytes are 0; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator const u8 * |
( |
|
) |
const [inline] |
Implicit conversion to const u8*.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
Implicit conversion to u8*.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator!= |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if not identical; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator< |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if this instance is smaller than the other; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator<= |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if this instance is smaller or equal to the other; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| Blob& Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator= |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
[inline] |
Duplicates the specified blob.
- Parameters:
-
| inBin | A Blob instance to be duplicated. |
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
Duplicates the specified data.
- Parameters:
-
| inBin | Data to copy. The pointer should point a memory location which is longer than SIZE. Only the first SIZE bytes are copied. |
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator== |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if identical; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator> |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if this instance is larger than the other; otherwise false.
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
| bool Celartem::Blob< _SIZE, NEED_SECURE_CLEANUP >::operator>= |
( |
const Blob< _SIZE, NEED_SECURE_CLEANUP > & |
inBin |
) |
const [inline] |
Comparison of two Blob instances.
- Returns:
true if this instance is larger or equal to the other; otherwise false.
Member Data Documentation
template<size_t _SIZE, bool NEED_SECURE_CLEANUP = false>
The documentation for this struct was generated from the following file: