verifierutils.hpp File Reference

Allows other parts of the program to include only one file when using classes from the verifierUtils library. More...

#include <cstdint>
#include "bytetree/bytetree.hpp"
#include "bytetree/leaf.hpp"
#include "bytetree/node.hpp"
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  verifierUtils
 Contains several classes and functions used throughout the whole verifier, in particular the ByteTree.

Functions

std::string verifierUtils::num2str (unsigned int number)
 Turns a number into a string of length 8 containing its hexdecimal representation. It is filled on the left with '0'.
std::string verifierUtils::byte2str (uint8_t b)
 Turns a byte into a two characters string.
uint8_t verifierUtils::doublon2byte (char b1, char b2)
 Turns two char representing a byte into the corresponding unsigned byte.
uint32_t verifierUtils::octuple2num (std::string s)
 Turns a string of length 8 into a number of bitlength 32.
std::vector< uint8_t > verifierUtils::largeNum2byteVector (mpz_class number)
 Turns an arbitrary large number into a vector containing bytes representing it. For instance, returns [0x1,0x0] if given 256.
std::vector< uint8_t > verifierUtils::file2bytes (std::string path)
 Returns the content of a file as a vector of bytes.

Detailed Description

Allows other parts of the program to include only one file when using classes from the verifierUtils library.

Author
Léo Perrin
Date
Time-stamp: <2012-08-08 20:58:22 leo>

Definition in file verifierutils.hpp.