Botan: Botan::MemoryVector< T > Class Template Reference

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
Botan::MemoryVector< T > Class Template Reference

`#include <secmem.h>`

Inheritance diagram for Botan::MemoryVector< T >:

## Public Member Functions
T * | begin ()
const T * | begin () const
void | clear ()
void | copy (const T in[], size_t n)
void | copy (size_t off, const T in[], size_t n)
bool | empty () const
T * | end ()
const T * | end () const
| MemoryVector (size_t n=0)
| MemoryVector (const T in[], size_t n)
| MemoryVector (const MemoryRegion< T > &in)
| operator const T * () const
| operator T * ()
bool | operator!= (const MemoryRegion< T > &other) const
bool | operator< (const MemoryRegion< T > &other) const
MemoryVector< T > & | operator= (const MemoryRegion< T > &in)
bool | operator== (const MemoryRegion< T > &other) const
void | push_back (T x)
void | resize (size_t n)
size_t | size () const
void | swap (MemoryRegion< T > &other)

## Protected Member Functions
void | init (bool locking, size_t length=0)

## Detailed Description

### template<typename T>
class Botan::MemoryVector< T >

This class represents variable length buffers that do not make use of memory locking.

Definition at line 267 of file secmem.h.

## Constructor & Destructor Documentation

template<typename T>

Botan::MemoryVector< T >::MemoryVector | ( | size_t | n = `0` | ) |
| inline

Create a buffer of the specified length.

Parameters

  n | the length of the buffer to create.

Definition at line 289 of file secmem.h.

289 { this->init(false, n); }
Botan::MemoryRegion::init
void init(bool locking, size_t length=0)
Definition: secmem.h:189
template<typename T>

Botan::MemoryVector< T >::MemoryVector | ( | const T | in[],
|  | size_t | n
| ) |  |
| inline

Create a buffer with the specified contents.

Parameters

  in | the array containing the data to be initially copied into the newly created buffer
  n | the size of the arry in

Definition at line 297 of file secmem.h.

298 {
299 this->init(false);
300 this->resize(n);
301 this->copy(in, n);
302 }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
Botan::MemoryRegion::copy
void copy(const T in[], size_t n)
Definition: secmem.h:120
Botan::MemoryRegion::init
void init(bool locking, size_t length=0)
Definition: secmem.h:189
template<typename T>

Botan::MemoryVector< T >::MemoryVector | ( | const MemoryRegion< T > & | in | ) |
| inline

Copy constructor.

Definition at line 307 of file secmem.h.

308 {
309 this->init(false);
310 this->resize(in.size());
311 this->copy(&in[0], in.size());
312 }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
Botan::MemoryRegion::copy
void copy(const T in[], size_t n)
Definition: secmem.h:120
Botan::MemoryRegion::init
void init(bool locking, size_t length=0)
Definition: secmem.h:189

## Member Function Documentation

template<typename T>

T* Botan::MemoryRegion< T >::begin | ( |  | ) |
| inlineinherited

Get a pointer to the first element in the buffer.

Returns
  pointer to the first element in the buffer

Definition at line 53 of file secmem.h.

Referenced by Botan::Blowfish::clear(), Botan::Bzip_Compression::end_msg(), Botan::Zlib_Compression::end_msg(), Botan::Bzip_Decompression::end_msg(), Botan::Zlib_Decompression::end_msg(), Botan::Bzip_Compression::flush(), Botan::Zlib_Compression::flush(), Botan::rfc3394_keyunwrap(), Botan::rfc3394_keywrap(), Botan::Zlib_Compression::write(), Botan::Bzip_Compression::write(), Botan::Bzip_Decompression::write(), and Botan::Zlib_Decompression::write().

53 { return buf; }
template<typename T>

const T* Botan::MemoryRegion< T >::begin | ( |  | ) | const
| inlineinherited

Get a constant pointer to the first element in the buffer.

Returns
  constant pointer to the first element in the buffer

Definition at line 59 of file secmem.h.

59 { return buf; }
template<typename T>

void Botan::MemoryRegion< T >::clear | ( |  | ) |
| inlineinherited

Reset this buffer to an empty buffer with size zero.

Definition at line 152 of file secmem.h.

Referenced by Botan::X509_DN::add_attribute(), Botan::ANSI_X931_RNG::clear(), Botan::BER_Decoder::decode_optional_string(), Botan::PK_Encryptor_Filter::end_msg(), Botan::PK_Decryptor_Filter::end_msg(), Botan::CMS_Encoder::get_contents(), Botan::SessionKeys::master_secret(), Botan::DataSource_Stream::peek(), Botan::BER_Decoder::raw_bytes(), and Botan::Filter::send().

152 { resize(0); }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
template<typename T>

void Botan::MemoryRegion< T >::copy | ( | const T | in[],
|  | size_t | n
| ) |  |
| inlineinherited

Copy the contents of an array of objects of type T into this buffer. The former contents of *this are discarded. The length of *this must be at least n, otherwise memory errors occur.

Parameters

  in | the array to copy the contents from
  n | the length of in

Definition at line 120 of file secmem.h.

Referenced by Botan::MDx_HashFunction::add_data(), Botan::BigInt::BigInt(), Botan::OctetString::change(), Botan::GOST_34_11::clear(), Botan::Skein_512::clear(), Botan::Serpent::decrypt_n(), Botan::Square::decrypt_n(), Botan::RC2::decrypt_n(), Botan::DESX::decrypt_n(), Botan::Lion::decrypt_n(), Botan::EAX_Decryption::EAX_Decryption(), Botan::MemoryRegion< word >::MemoryRegion(), Botan::MemoryVector< byte >::MemoryVector(), Botan::MemoryRegion< word >::operator=(), Botan::MemoryVector< byte >::operator=(), Botan::SecureVector< word >::operator=(), Botan::operator^(), Botan::CMAC::poly_double(), Botan::SecureVector< word >::SecureVector(), Botan::Record_Writer::send(), Botan::OFB::set_iv(), Botan::CFB_Encryption::set_iv(), Botan::CTR_BE::set_iv(), Botan::CTS_Encryption::set_iv(), Botan::CFB_Decryption::set_iv(), Botan::CTS_Decryption::set_iv(), Botan::Base64_Encoder::write(), Botan::Hex_Encoder::write(), and Botan::DLIES_Encryptor::~DLIES_Encryptor().

121 {
122 copy_mem(buf, in, std::min(n, size()));
123 }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
Botan::copy_mem
void copy_mem(T *out, const T *in, size_t n)
Definition: mem_ops.h:22
template<typename T>

void Botan::MemoryRegion< T >::copy | ( | size_t | off,
|  | const T | in[],
|  | size_t | n
| ) |  |
| inlineinherited

Copy the contents of an array of objects of type T into this buffer. The former contents of *this are discarded. The length of *this must be at least n, otherwise memory errors occur.

Parameters

  off | the offset position inside this buffer to start inserting the copied bytes
  in | the array to copy the contents from
  n | the length of in

Definition at line 134 of file secmem.h.

135 {
136 copy_mem(buf + off, in, std::min(n, size() - off));
137 }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
Botan::copy_mem
void copy_mem(T *out, const T *in, size_t n)
Definition: mem_ops.h:22
template<typename T>

bool Botan::MemoryRegion< T >::empty | ( |  | ) | const
| inlineinherited

Find out whether this buffer is empty.

Returns
  true if the buffer is empty, false otherwise

Definition at line 35 of file secmem.h.

Referenced by Botan::BER_Decoder::decode(), Botan::X509_DN::encode_into(), Botan::X509::load_key(), Botan::CMS_Encoder::set_data(), and Botan::DLIES_Encryptor::~DLIES_Encryptor().

35 { return (used == 0); }
template<typename T>

T* Botan::MemoryRegion< T >::end | ( |  | ) |
| inlineinherited

Get a pointer to one past the last element in the buffer.

Returns
  pointer to one past the last element in the buffer

Definition at line 65 of file secmem.h.

65 { return (buf + size()); }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
template<typename T>

const T* Botan::MemoryRegion< T >::end | ( |  | ) | const
| inlineinherited

Get a const pointer to one past the last element in the buffer.

Returns
  const pointer to one past the last element in the buffer

Definition at line 71 of file secmem.h.

71 { return (buf + size()); }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
template<typename T>

void Botan::MemoryRegion< T >::init | ( | bool | locking,
|  | size_t | length = `0`
| ) |  |
| inlineprotectedinherited

Parameters

  locking | should we use a locking allocator
  length | the initial length to use

Definition at line 189 of file secmem.h.

Referenced by Botan::MemoryVector< byte >::MemoryVector(), and Botan::SecureVector< word >::SecureVector().

190 { alloc = Allocator::get(locking); resize(length); }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
Botan::Allocator::get
static Allocator * get(bool locking)
Definition: defalloc.cpp:90
template<typename T>

Botan::MemoryRegion< T >::operator const T * | ( |  | ) | const
| inlineinherited

Get a constant pointer to the first element in the buffer.

Returns
  constant pointer to the first element in the buffer

Definition at line 47 of file secmem.h.

47 { return buf; }
template<typename T>

Botan::MemoryRegion< T >::operator T * | ( |  | ) |
| inlineinherited

Get a pointer to the first element in the buffer.

Returns
  pointer to the first element in the buffer

Definition at line 41 of file secmem.h.

41 { return buf; }
template<typename T>

bool Botan::MemoryRegion< T >::operator!= | ( | const MemoryRegion< T > & | other | ) | const
| inlineinherited

Check two buffers for inequality.

Returns
  false if the content of both buffers is byte-wise equal, true otherwise.

Definition at line 94 of file secmem.h.

95 { return (!(*this == other)); }
template<typename T>

bool Botan::MemoryRegion< T >::operator< | ( | const MemoryRegion< T > & | other | ) | const
| inherited

Compare two buffers

Returns
  true iff this is ordered before other

Definition at line 233 of file secmem.h.

References Botan::MemoryRegion< T >::size().

234 {
235 const size_t min_size = std::min(size(), other.size());
236
237 // This should probably be rewritten to run in constant time
238 for(size_t i = 0; i != min_size; ++i)
239 {
240 if(buf[i] < other[i])
241 return true;
242 if(buf[i] > other[i])
243 return false;
244 }
245
246 // First min_size bytes are equal, shorter is first
247 return (size() < other.size());
248 }
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
template<typename T>

MemoryVector<T>& Botan::MemoryVector< T >::operator= | ( | const MemoryRegion< T > & | in | ) |
| inline

Copy the contents of another buffer into this buffer.

Parameters

  in | the buffer to copy the contents from

Returns
  reference to *this

Definition at line 275 of file secmem.h.

276 {
277 if(this != &in)
278 {
279 this->resize(in.size());
280 this->copy(&in[0], in.size());
281 }
282 return (*this);
283 }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
Botan::MemoryRegion::copy
void copy(const T in[], size_t n)
Definition: secmem.h:120
template<typename T>

bool Botan::MemoryRegion< T >::operator== | ( | const MemoryRegion< T > & | other | ) | const
| inlineinherited

Check two buffers for equality.

Returns
  true iff the content of both buffers is byte-wise equal

Definition at line 77 of file secmem.h.

78 {
79 return (size() == other.size() &&
80 same_mem(buf, other.buf, size()));
81 }
Botan::same_mem
bool same_mem(const T *p1, const T *p2, size_t n)
Definition: mem_ops.h:57
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
template<typename T>

void Botan::MemoryRegion< T >::push_back | ( | T | x | ) |
| inlineinherited

Append a single element.

Parameters

  x | the element to append

Definition at line 143 of file secmem.h.

Referenced by Botan::append_tls_length_value(), Botan::Certificate::Certificate(), Botan::Certificate_Verify::Certificate_Verify(), Botan::Client_Hello::Client_Hello(), Botan::CVC_EAC::create_cvc_req(), Botan::EC2OSP(), Botan::DER_Encoder::encode(), Botan::OID::encode_into(), Botan::Cert_Extension::Basic_Constraints::get_path_limit(), Botan::make_cvc_cert(), Botan::operator+=(), Botan::BER_Decoder::raw_bytes(), Botan::Server_Hello::Server_Hello(), Botan::RTSS_Share::split(), and Botan::HandshakeHash::update().

144 {
145 resize(size() + 1);
146 buf[size()-1] = x;
147 }
Botan::MemoryRegion::resize
void resize(size_t n)
Definition: secmem.h:211
Botan::MemoryRegion::size
size_t size() const
Definition: secmem.h:29
template<typename T >

void Botan::MemoryRegion< T >::resize | ( | size_t | n | ) |
| inherited

Inserts or erases elements at the end such that the size becomes n, leaving elements in the range 0...n unmodified if set or otherwise zero-initialized

Parameters

  n | length of the new buffer

Definition at line 211 of file secmem.h.

References Botan::clear_mem(), and Botan::copy_mem().

Referenced by Botan::ANSI_X931_RNG::ANSI_X931_RNG(), Botan::base64_decode(), Botan::BigInt::BigInt(), Botan::BigInt::binary_decode(), Botan::Buffered_Filter::Buffered_Filter(), Botan::CBC_Decryption::CBC_Decryption(), Botan::CBC_Encryption::CBC_Encryption(), Botan::CFB_Decryption::CFB_Decryption(), Botan::CFB_Encryption::CFB_Encryption(), Botan::OctetString::change(), Botan::Turing::cipher(), Botan::MemoryRegion< word >::clear(), Botan::TLS_Server::close(), Botan::CMAC::CMAC(), Botan::CTS_Decryption::CTS_Decryption(), Botan::CTS_Encryption::CTS_Encryption(), Botan::BER_Decoder::decode(), Botan::LubyRackoff::decrypt_n(), Botan::divide(), Botan::EAX_Decryption::EAX_Decryption(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), Botan::PBE_PKCS5v15::end_msg(), Botan::Montgomery_Exponentiator::execute(), Botan::Entropy_Accumulator::get_io_buffer(), Botan::BER_Decoder::get_next_object(), Botan::Record_Reader::get_record(), Botan::BigInt::grow_reg(), Botan::BigInt::grow_to(), Botan::hex_decode(), Botan::Hex_Decoder::Hex_Decoder(), Botan::Hex_Encoder::Hex_Encoder(), Botan::HMAC::HMAC(), Botan::MemoryRegion< word >::init(), Botan::TLS_Client::is_closed(), Botan::Lion::Lion(), Botan::MemoryRegion< word >::MemoryRegion(), Botan::MemoryVector< byte >::MemoryVector(), Botan::OFB::OFB(), Botan::operator+=(), Botan::MemoryRegion< word >::operator=(), Botan::MemoryVector< byte >::operator=(), Botan::SecureVector< word >::operator=(), Botan::PointGFp::PointGFp(), Botan::MemoryRegion< word >::push_back(), Botan::ANSI_X931_RNG::randomize(), Botan::Randpool::Randpool(), Botan::Pipe::read_all(), Botan::SAFER_SK::SAFER_SK(), Botan::SecureVector< word >::SecureVector(), Botan::Server_Key_Exchange::Server_Key_Exchange(), Botan::CMS_Encoder::set_data(), Botan::SSL3_MAC::SSL3_MAC(), and Botan::Base64_Decoder::write().

212 {
213 if(n <= allocated)
214 {
215 size_t zap = std::min(used, n);
216 clear_mem(buf + zap, allocated - zap);
217 used = n;
218 }
219 else
220 {
221 T* new_buf = allocate(n);
222 copy_mem(new_buf, buf, used);
223 deallocate(buf, allocated);
224 buf = new_buf;
225 allocated = used = n;
226 }
227 }
Botan::clear_mem
void clear_mem(T *ptr, size_t n)
Definition: mem_ops.h:32
Botan::copy_mem
void copy_mem(T *out, const T *in, size_t n)
Definition: mem_ops.h:22
template<typename T>

size_t Botan::MemoryRegion< T >::size | ( |  | ) | const
| inlineinherited

Find out the size of the buffer, i.e. how many objects of type T it contains.

Returns
  size of the buffer

Definition at line 29 of file secmem.h.

Referenced by Botan::Data_Store::add(), Botan::MDx_HashFunction::add_data(), Botan::Randpool::add_entropy(), Botan::DER_Encoder::add_object(), Botan::Alert::Alert(), Botan::append_tls_length_value(), Botan::OctetString::as_string(), Botan::base64_encode(), Botan::Base64_Encoder::Base64_Encoder(), Botan::BigInt::binary_decode(), Botan::Certificate::Certificate(), Botan::Certificate_Req::Certificate_Req(), Botan::Certificate_Verify::Certificate_Verify(), Botan::DataSource_Memory::check_available(), Botan::check_passhash9(), Botan::PK_Verifier::check_signature(), Botan::Salsa20::cipher(), Botan::Turing::cipher(), Botan::CTR_BE::cipher(), Botan::OFB::cipher(), Botan::ARC4::cipher(), Botan::WiderWake_41_BE::cipher(), Botan::GOST_34_11::clear(), Botan::Keccak_1600::clear(), Botan::Skein_512::clear(), Botan::Comb4P::clear(), Botan::Client_Hello::Client_Hello(), Botan::TLS_Server::close(), Botan::MD5::compress_n(), Botan::MemoryRegion< word >::copy(), Botan::BER::decode(), Botan::BER_Decoder::decode(), Botan::EME::decode(), Botan::BigInt::decode(), Botan::decode_concatenation(), Botan::OID::decode_from(), Botan::EAC_Time::decode_from(), Botan::AlternativeName::decode_from(), Botan::BER_Decoder::decode_null(), Botan::BER_Decoder::decode_octet_string_bigint(), Botan::CryptoBox::decrypt(), Botan::PK_Decryptor::decrypt(), Botan::X942_PRF::derive(), Botan::KDF2::derive(), Botan::KDF::derive_key(), Botan::OpenPGP_S2K::derive_key(), Botan::PKCS5_PBKDF1::derive_key(), Botan::PK_Key_Agreement::derive_key(), Botan::EAX_Decryption::EAX_Decryption(), Botan::Blowfish::eks_key_schedule(), Botan::PEM_Code::encode(), Botan::DER_Encoder::encode(), Botan::EME::encode(), Botan::EMSA3::encoding_of(), Botan::CryptoBox::encrypt(), Botan::PK_Encryptor::encrypt(), Botan::MemoryRegion< word >::end(), Botan::Zlib_Compression::end_msg(), Botan::Bzip_Compression::end_msg(), Botan::PBE_PKCS5v15::end_msg(), Botan::PBE_PKCS5v20::end_msg(), Botan::Bzip_Decompression::end_msg(), Botan::Zlib_Decompression::end_msg(), Botan::Hash_Filter::end_msg(), Botan::MAC_Filter::end_msg(), Botan::Montgomery_Exponentiator::execute(), Botan::MDx_HashFunction::final_result(), Botan::Certificate_Store_Memory::find_cert_by_subject_and_key_id(), Botan::Certificate_Store_Memory::find_crl_by_subject_and_key_id(), Botan::Bzip_Compression::flush(), Botan::Zlib_Compression::flush(), Botan::Record_Writer::flush(), Botan::generate_dsa_primes(), Botan::generate_passhash9(), Botan::EAC1_1_CVC::get_chat_value(), Botan::CMS_Decoder::get_data(), Botan::TLS_Data_Reader::get_fixed(), Botan::Cert_Extension::Basic_Constraints::get_path_limit(), Botan::Record_Reader::get_record(), Botan::Hello_Request::Hello_Request(), Botan::Hex_Decoder::Hex_Decoder(), Botan::hex_encode(), Botan::Hex_Encoder::Hex_Encoder(), Botan::TLS_Client::is_closed(), Botan::ANSI_X931_RNG::is_seeded(), Botan::MGF1::mask(), Botan::PEM_Code::matches(), Botan::EME1::maximum_input_size(), Botan::MemoryRegion< word >::MemoryRegion(), Botan::MemoryVector< byte >::MemoryVector(), Botan::ECB_Encryption::name(), Botan::EAX_Base::name(), Botan::ECB_Decryption::name(), Botan::BigInt::operator*=(), Botan::BigInt::operator+=(), Botan::operator+=(), Botan::MemoryRegion< T >::operator<(), Botan::operator<<(), Botan::MemoryRegion< word >::operator=(), Botan::MemoryVector< byte >::operator=(), Botan::SecureVector< word >::operator=(), Botan::MemoryRegion< word >::operator==(), Botan::operator>>(), Botan::OS2ECP(), Botan::OSSL_BN::OSSL_BN(), Botan::DataSource_Stream::peek(), Botan::PK_Encryptor_EME::PK_Encryptor_EME(), Botan::PointGFp::PointGFp(), Botan::FTW_EntropySource::poll(), Botan::Win32_CAPI_EntropySource::poll(), Botan::Device_EntropySource::poll(), Botan::Unix_EntropySource::poll(), Botan::CMAC::poly_double(), Botan::Client_Key_Exchange::pre_master_secret(), Botan::Buffered_Computation::process(), Botan::Pipe::process_msg(), Botan::MemoryRegion< word >::push_back(), Botan::random_prime(), Botan::RandomNumberGenerator::random_vec(), Botan::ANSI_X931_RNG::randomize(), Botan::Randpool::randomize(), Botan::BigInt::randomize(), Botan::DER_Encoder::raw_bytes(), Botan::Pipe::read_all(), Botan::Pipe::read_all_as_string(), Botan::TLS_Data_Reader::remaining_bytes(), Botan::Randpool::reseed(), Botan::rfc3394_keyunwrap(), Botan::rfc3394_keywrap(), Botan::SecureVector< word >::SecureVector(), Botan::HandshakeMessage::send(), Botan::Record_Writer::send(), Botan::Filter::send(), Botan::Server_Hello::Server_Hello(), Botan::Server_Hello_Done::Server_Hello_Done(), Botan::Server_Key_Exchange::Server_Key_Exchange(), Botan::Montgomery_Exponentiator::set_base(), Botan::Turing::set_iv(), Botan::CTS_Encryption::set_iv(), Botan::WiderWake_41_BE::set_iv(), Botan::EAX_Base::set_iv(), Botan::CBC_Encryption::set_iv(), Botan::CTS_Decryption::set_iv(), Botan::CBC_Decryption::set_iv(), Botan::XTS_Encryption::set_key(), Botan::OctetString::set_odd_parity(), Botan::CMS_Encoder::sign(), Botan::PK_Signer::sign_message(), Botan::PK_Signer::signature(), Botan::RTSS_Share::split(), Botan::BER_Decoder::start_cons(), Botan::ASN1::to_string(), Botan::RTSS_Share::to_string(), Botan::Buffered_Computation::update(), Botan::PK_Signer::update(), Botan::PK_Verifier::update(), Botan::EMSA3::verify(), Botan::MessageAuthenticationCode::verify_mac(), Botan::PK_Verifier::verify_message(), Botan::Bzip_Compression::write(), Botan::Zlib_Compression::write(), Botan::Buffered_Filter::write(), Botan::Base64_Encoder::write(), Botan::Hex_Encoder::write(), Botan::StreamCipher_Filter::write(), Botan::Bzip_Decompression::write(), Botan::Zlib_Decompression::write(), Botan::Hex_Decoder::write(), Botan::Base64_Decoder::write(), Botan::Pipe::write(), Botan::zeroise(), Botan::DLIES_Decryptor::~DLIES_Decryptor(), and Botan::DLIES_Encryptor::~DLIES_Encryptor().

29 { return used; }
template<typename T>

void Botan::MemoryRegion< T >::swap | ( | MemoryRegion< T > & | other | ) |
| inherited

Swap this buffer with another object.

Definition at line 254 of file secmem.h.

References std::swap().

Referenced by Botan::MemoryRegion< word >::clear(), Botan::PointGFp::swap(), std::swap(), and Botan::BigInt::swap().

255 {
256 std::swap(buf, x.buf);
257 std::swap(used, x.used);
258 std::swap(allocated, x.allocated);
259 std::swap(alloc, x.alloc);
260 }
std::swap
void swap(Botan::MemoryRegion< T > &x, Botan::MemoryRegion< T > &y)
Definition: secmem.h:425

The documentation for this class was generated from the following file:

- src/alloc/secmem.h