diff options
author | lloyd <[email protected]> | 2010-02-14 02:48:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-02-14 02:48:24 +0000 |
commit | 3b980d2fcee997ba262cf7e8d8542eb51a56be3e (patch) | |
tree | 3071c7f37f503319a65acc87ed8931ab79cd32d9 | |
parent | dfaf4e403fdc7c80a2ac7a91ab699eb85612bb63 (diff) | |
parent | ba2bd8705698411cbdff71d1a7e5285251129b13 (diff) |
propagate from branch 'net.randombit.botan' (head f3117d253e37aaf3f094137c1b028bebb8a2575a)
to branch 'net.randombit.botan.ssl' (head 9d4861abf3f8b5394134752fa46035cf4b3d6bc7)
-rw-r--r-- | src/utils/debug.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/utils/debug.h b/src/utils/debug.h index c7f19c1b1..271e0047b 100644 --- a/src/utils/debug.h +++ b/src/utils/debug.h @@ -9,26 +9,23 @@ #define BOTAN_DEBUG_H__ #include <botan/secmem.h> -#include <iostream> +#include <cstdio> namespace Botan { namespace Debug { -template<typename T> -void print_vec(const std::string& name, - const T array[], size_t array_len) +inline void print_vec(const std::string& name, + const byte array[], size_t array_len) { - std::cout << name << " = "; - + std::printf("%s = ", name.c_str()); for(size_t i = 0; i != array_len; ++i) - std::cout << std::hex << array[i]; - std::cout << std::endl; + std::printf("%02X", array[i]); + std::printf("\n"); } -template<typename T> -void print_vec(const std::string& name, - const MemoryRegion<T>& vec) +inline void print_vec(const std::string& name, + const MemoryRegion<byte>& vec) { print_vec(name, &vec[0], vec.size()); } |