osb/source/core/StarEncode.hpp

25 lines
804 B
C++
Raw Normal View History

#pragma once
2023-06-20 04:33:09 +00:00
#include "StarString.hpp"
#include "StarByteArray.hpp"
namespace Star {
size_t hexEncode(char const* data, size_t len, char* output, size_t outLen = NPos);
size_t hexDecode(char const* src, size_t len, char* output, size_t outLen = NPos);
size_t nibbleDecode(char const* src, size_t len, char* output, size_t outLen = NPos);
size_t base64Encode(char const* data, size_t len, char* output, size_t outLen = NPos);
size_t base64Decode(char const* src, size_t len, char* output, size_t outLen = NPos);
String hexEncode(char const* data, size_t len);
String base64Encode(char const* data, size_t len);
String hexEncode(ByteArray const& data);
ByteArray hexDecode(String const& encodedData);
String base64Encode(ByteArray const& data);
ByteArray base64Decode(String const& encodedData);
}