blob: c7f19c1b186a553711db4faaf8deb7df2a06119d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/**
* Internal-use debugging functions for Botan
* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_DEBUG_H__
#define BOTAN_DEBUG_H__
#include <botan/secmem.h>
#include <iostream>
namespace Botan {
namespace Debug {
template<typename T>
void print_vec(const std::string& name,
const T array[], size_t array_len)
{
std::cout << name << " = ";
for(size_t i = 0; i != array_len; ++i)
std::cout << std::hex << array[i];
std::cout << std::endl;
}
template<typename T>
void print_vec(const std::string& name,
const MemoryRegion<T>& vec)
{
print_vec(name, &vec[0], vec.size());
}
}
}
#endif
|