25 typedef typename std::vector<T>::iterator
iterator;
31 explicit SecBuf(
size_t n,
const T& value = T()) : vec_(n, value) {}
33 SecBuf(iterator first, iterator last) : vec_(first, last) {}
35 SecBuf(const_iterator first, const_iterator last) : vec_(first, last) {}
37 SecBuf(
const std::vector<T>& x) : vec_(x) {}
40 #if defined(__has_feature)
41 #if __has_feature(address_sanitizer)
43 vec_.resize(vec_.capacity());
46 std::memset(&vec_[0], 0, vec_.capacity() *
sizeof(T));
50 return (vec_.begin());
54 return (vec_.begin());
61 const_iterator
end()
const {
74 #if defined(__has_feature)
75 #if __has_feature(address_sanitizer)
77 vec_.resize(vec_.capacity());
80 std::memset(&vec_[0], 0, vec_.capacity() *
sizeof(T));
101 bool same(
const void* x,
size_t len)
const {
103 const T* p =
static_cast<const T*
>(x);
104 for (
size_t i = 0; i < len; ++i)
105 ret = ret && (vec_[i] == p[i]);
SecBuf(size_t n, const T &value=T())
SecBuf & operator=(const SecBuf &x)
std::vector< T >::const_iterator const_iterator
HashAlgorithm
Hash algorithm identifiers.
SecBuf(const_iterator first, const_iterator last)
const EVP_MD * getHashAlgorithm(isc::cryptolink::HashAlgorithm algorithm)
Decode the HashAlgorithm enum into an EVP_MD pointer (or 0)
Defines the logger used by the top-level component of kea-dhcp-ddns.
const T & operator[](size_t n) const
bool same(const void *x, size_t len) const
const_iterator begin() const
SecBuf(const std::vector< T > &x)
const_iterator end() const
Secure Buffers which are wiped out when released.
SecBuf(iterator first, iterator last)
std::vector< T >::iterator iterator