12 #include <gtest/gtest.h> 24 for (
size_t seed=0;seed<500;seed++)
31 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 ) <<
"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
BASE_IMPEXP CRandomGenerator randomGenerator
A static instance of a CRandomGenerator class, for use in single-thread applications.
void randomize(const uint32_t seed)
Initialize the PRNG from the given random seed.
void BASE_IMPEXP 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 BASE_IMPEXP 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)