Base128 encoding of minidumps before uploading.
This commit is contained in:
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user