memory_operations.hpp File Reference
#include <cstring>
#include <vector>
+ Include dependency graph for memory_operations.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 nil
 
 nil::crypto3
 

Functions

BOOST_ATTRIBUTE_MALLOC_FUNCTION void * nil::crypto3::allocate_memory (size_t elems, size_t elem_size)
 
uint8_t * nil::crypto3::cast_char_ptr_to_uint8 (char *s)
 
const uint8_t * nil::crypto3::cast_char_ptr_to_uint8 (const char *s)
 
const char * nil::crypto3::cast_uint8_ptr_to_char (const uint8_t *b)
 
char * nil::crypto3::cast_uint8_ptr_to_char (uint8_t *b)
 
void nil::crypto3::clear_bytes (void *ptr, size_t bytes)
 
template<typename T >
void nil::crypto3::clear_mem (T *ptr, size_t n)
 
bool nil::crypto3::constant_time_compare (const uint8_t x[], const uint8_t y[], size_t len)
 
template<typename T >
void nil::crypto3::copy_mem (T *out, const T *in, size_t n)
 
void nil::crypto3::deallocate_memory (void *p, size_t elems, size_t elem_size)
 
void nil::crypto3::initialize_allocator ()
 
template<typename Alloc , typename Alloc2 >
std::vector< uint8_t, Alloc > & nil::crypto3::operator^= (std::vector< uint8_t, Alloc > &out, const std::vector< uint8_t, Alloc2 > &in)
 
template<typename T >
bool nil::crypto3::same_mem (const T *p1, const T *p2, size_t n)
 
void nil::crypto3::secure_scrub_memory (void *ptr, size_t n)
 
template<typename T >
void nil::crypto3::set_mem (T *ptr, size_t n, uint8_t val)
 
template<typename Alloc , typename Alloc2 >
void nil::crypto3::xor_buf (std::vector< uint8_t, Alloc > &out, const std::vector< uint8_t, Alloc2 > &in, size_t n)
 
template<typename Alloc , typename Alloc2 >
void nil::crypto3::xor_buf (std::vector< uint8_t, Alloc > &out, const uint8_t *in, const std::vector< uint8_t, Alloc2 > &in2, size_t n)
 
template<typename Alloc >
void nil::crypto3::xor_buf (std::vector< uint8_t, Alloc > &out, const uint8_t *in, size_t n)
 
void nil::crypto3::xor_buf (uint8_t out[], const uint8_t in[], const uint8_t in2[], size_t length)
 
void nil::crypto3::xor_buf (uint8_t out[], const uint8_t in[], size_t length)