Crypto++
5.6.3
Free C++ class library of cryptographic schemes
|
Fixed size stack-based SecBlock with 16-byte alignment. More...
Public Types | |
typedef FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::value_type | value_type |
typedef FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::pointer | iterator |
typedef FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::const_pointer | const_iterator |
typedef FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::size_type | size_type |
Public Member Functions | |
operator const void * () const | |
operator void * () | |
operator const T * () const | |
operator T * () | |
iterator | begin () |
Provides an iterator pointing to the first element in the memory block. More... | |
const_iterator | begin () const |
Provides a constant iterator pointing to the first element in the memory block. More... | |
iterator | end () |
Provides an iterator pointing beyond the last element in the memory block. More... | |
const_iterator | end () const |
Provides a constant iterator pointing beyond the last element in the memory block. More... | |
FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::pointer | data () |
Provides a pointer to the first element in the memory block. More... | |
FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 >::const_pointer | data () const |
Provides a pointer to the first element in the memory block. More... | |
size_type | size () const |
Provides the count of elements in the SecBlock. More... | |
bool | empty () const |
Determines if the SecBlock is empty. More... | |
byte * | BytePtr () |
Provides a byte pointer to the first element in the memory block. More... | |
const byte * | BytePtr () const |
Return a byte pointer to the first element in the memory block. More... | |
size_type | SizeInBytes () const |
Provides the number of bytes in the SecBlock. More... | |
void | Assign (const T *ptr, size_type len) |
Set contents and size from an array. More... | |
void | Assign (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &t) |
Copy contents from another SecBlock. More... | |
SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > & | operator+= (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &t) |
Append contents from another SecBlock. More... | |
SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > | operator+ (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &t) |
Concatenate contents from another SecBlock. More... | |
bool | operator== (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &t) const |
Bitwise compare two SecBlocks. More... | |
bool | operator!= (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &t) const |
Bitwise compare two SecBlocks. More... | |
void | New (size_type newSize) |
Change size without preserving contents. More... | |
void | CleanNew (size_type newSize) |
Change size without preserving contents. More... | |
void | Grow (size_type newSize) |
Change size and preserve contents. More... | |
void | CleanGrow (size_type newSize) |
Change size and preserve contents. More... | |
void | resize (size_type newSize) |
Change size and preserve contents. More... | |
void | swap (SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > > &b) |
Swap contents with another SecBlock. More... | |
Public Attributes | |
FixedSizeAllocatorWithCleanup< T, S, NullAllocator< T >, T_Align16 > | m_alloc |
size_type | m_size |
T * | m_ptr |
Fixed size stack-based SecBlock with 16-byte alignment.
T | class or type |
S | fixed-size of the stack-based memory block |
A | AllocatorBase derived class for allocation and cleanup |
Definition at line 754 of file secblock.h.
|
inlineinherited |
Provides an iterator pointing to the first element in the memory block.
Definition at line 484 of file secblock.h.
|
inlineinherited |
Provides a constant iterator pointing to the first element in the memory block.
Definition at line 488 of file secblock.h.
|
inlineinherited |
Provides an iterator pointing beyond the last element in the memory block.
Definition at line 492 of file secblock.h.
|
inlineinherited |
Provides a constant iterator pointing beyond the last element in the memory block.
Definition at line 496 of file secblock.h.
|
inlineinherited |
Provides a pointer to the first element in the memory block.
Definition at line 501 of file secblock.h.
|
inlineinherited |
Provides a pointer to the first element in the memory block.
Definition at line 504 of file secblock.h.
|
inlineinherited |
Provides the count of elements in the SecBlock.
Definition at line 509 of file secblock.h.
|
inlineinherited |
Determines if the SecBlock is empty.
Definition at line 512 of file secblock.h.
|
inlineinherited |
Provides a byte pointer to the first element in the memory block.
Definition at line 516 of file secblock.h.
|
inlineinherited |
Return a byte pointer to the first element in the memory block.
Definition at line 519 of file secblock.h.
|
inlineinherited |
Provides the number of bytes in the SecBlock.
Definition at line 523 of file secblock.h.
|
inlineinherited |
Set contents and size from an array.
ptr | a pointer to an array of T |
len | the number of elements in the memory block |
If the memory block is reduced in size, then the unused area is set to 0.
Definition at line 529 of file secblock.h.
|
inlineinherited |
Copy contents from another SecBlock.
t | the other SecBlock |
Assign checks for self assignment.
If the memory block is reduced in size, then the unused area is set to 0.
Definition at line 540 of file secblock.h.
|
inlineinherited |
Append contents from another SecBlock.
t | the other SecBlock |
Internally, this SecBlock calls Grow and then copies the new content.
If the memory block is reduced in size, then the unused area is set to 0.
Definition at line 565 of file secblock.h.
|
inlineinherited |
Concatenate contents from another SecBlock.
t | the other SecBlock |
Internally, a temporary SecBlock is created and the content from this SecBlock and the other SecBlock are concatenated. The temporary SecBlock is returned to the caller.
Definition at line 586 of file secblock.h.
|
inlineinherited |
Bitwise compare two SecBlocks.
t | the other SecBlock |
Uses a constant time compare if the arrays are equal size. The constant time compare is VerifyBufsEqual() found in misc.h.
Definition at line 604 of file secblock.h.
|
inlineinherited |
Bitwise compare two SecBlocks.
t | the other SecBlock |
Uses a constant time compare if the arrays are equal size. The constant time compare is VerifyBufsEqual() found in misc.h.
Internally, operator!=() returns the inverse of operator==().
Definition at line 616 of file secblock.h.
|
inlineinherited |
Change size without preserving contents.
newSize | the new size of the memory block |
Old content is not preserved. If the memory block is reduced in size, then the unused content is set to 0. If the memory block grows in size, then all content is uninitialized.
Internally, this SecBlock calls reallocate().
Definition at line 628 of file secblock.h.
|
inlineinherited |
Change size without preserving contents.
newSize | the new size of the memory block |
Old content is not preserved. If the memory block is reduced in size, then the unused content is set to 0. Existing and new content is set to 0.
Internally, this SecBlock calls reallocate().
Definition at line 640 of file secblock.h.
|
inlineinherited |
Change size and preserve contents.
newSize | the new size of the memory block |
Old content is preserved. If the memory block grows in size, then all content is uninitialized.
Internally, this SecBlock calls reallocate().
Definition at line 655 of file secblock.h.
|
inlineinherited |
Change size and preserve contents.
newSize | the new size of the memory block |
Old content is preserved. If the memory block is reduced in size, then the unused content is set to 0. If the memory block grows in size, then the new content is uninitialized.
Internally, this SecBlock calls reallocate().
Definition at line 674 of file secblock.h.
|
inlineinherited |
Change size and preserve contents.
newSize | the new size of the memory block |
Old content is preserved. If the memory block grows in size, then all content is uninitialized.
Internally, this SecBlock calls reallocate().
Definition at line 693 of file secblock.h.
|
inlineinherited |
Swap contents with another SecBlock.
b | the other SecBlock |
Internally, std::swap() is called on m_alloc, m_size and m_ptr.
Definition at line 702 of file secblock.h.