Base128 encoding of minidumps before uploading.

This commit is contained in:
/dev/urandom
2016-08-28 22:46:23 +02:00
parent 01a90e42e4
commit f9e2eeca7b
7 changed files with 83 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include "STDInclude.hpp"
#include "base128.h"
namespace Utils
{
@ -131,6 +132,14 @@ namespace Utils
return EncodeBase64(input.c_str(), input.size());
}
// Encodes a given string in Base128
std::string EncodeBase128(const std::string& input) {
auto encoder = new base128();
auto buffer = encoder->encode(const_cast<void*>(static_cast<const void*>(input.data())), input.size());
delete encoder;
return std::string(buffer);
}
// Generates a UUID and returns the string representation of it
std::string GenerateUUIDString() {
// Generate UUID data

View File

@ -43,6 +43,8 @@ namespace Utils
std::string EncodeBase64(const char* input, const unsigned long inputSize);
std::string EncodeBase64(const std::string& input);
std::string EncodeBase128(const std::string& input);
std::string GenerateUUIDString();
}
}