25 typedef typename std::vector<T>::iterator
iterator;
31 explicit SecBuf(
size_t n,
const T& value = T()) : vec_(n, value) {}
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());
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]);
Secure Buffers which are wiped out when released.
SecBuf(iterator first, iterator last)
const_iterator end() const
const_iterator begin() const
std::vector< T >::const_iterator const_iterator
SecBuf(const std::vector< T > &x)
const T & operator[](size_t n) const
std::vector< T >::iterator iterator
SecBuf(size_t n, const T &value=T())
SecBuf & operator=(const SecBuf &x)
SecBuf(const_iterator first, const_iterator last)
bool same(const void *x, size_t len) const
const EVP_MD * getHashAlgorithm(isc::cryptolink::HashAlgorithm algorithm)
Decode the HashAlgorithm enum into an EVP_MD pointer (or 0)
HashAlgorithm
Hash algorithm identifiers.
Defines the logger used by the top-level component of kea-lfc.