12 #include <gtest/gtest.h> 23 for (
size_t seed = 0; seed < 500; seed++)
30 for (
size_t n = 0;
n < block_len;
n++)
39 GTEST_FAIL() <<
"Error decoding the just encoded data!\n";
42 EXPECT_EQ(outData.size(), myData.size());
46 EXPECT_TRUE(outData == myData)
47 <<
"64-decoded data does not match original data!!\n";
A namespace of pseudo-random numbers genrators of diferent distributions.
uint32_t drawUniform32bit()
Generate a uniformly distributed pseudo-random number using the MT19937 algorithm, in the whole range of 32-bit integers.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
std::vector< uint8_t > vector_byte
void randomize(const uint32_t seed)
Initialize the PRNG from the given random seed.
void encodeBase64(const vector_byte &inputData, std::string &outString)
Encode a sequence of bytes as a string in base-64.
This base provides a set of functions for maths stuff.
bool decodeBase64(const std::string &inString, vector_byte &outData)
Decode a base-64 string into the original sequence of bytes.
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TEST(Base64, RandomEncDec)
CRandomGenerator & getRandomGenerator()
A static instance of a CRandomGenerator class, for use in single-thread applications.