Changeset View
Changeset View
Standalone View
Standalone View
src/util/strencodings.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Returns true if each character in str is a hex character, and has an even | * Returns true if each character in str is a hex character, and has an even | ||||
* number of hex digits. | * number of hex digits. | ||||
*/ | */ | ||||
bool IsHex(const std::string &str); | bool IsHex(const std::string &str); | ||||
/** | /** | ||||
* Return true if the string is a hex number, optionally prefixed with "0x" | * Return true if the string is a hex number, optionally prefixed with "0x" | ||||
*/ | */ | ||||
bool IsHexNumber(const std::string &str); | bool IsHexNumber(const std::string &str) noexcept; | ||||
std::vector<uint8_t> DecodeBase64(const char *p, bool *pfInvalid = nullptr); | std::vector<uint8_t> DecodeBase64(const char *p, bool *pfInvalid = nullptr); | ||||
std::string DecodeBase64(const std::string &str); | std::string DecodeBase64(const std::string &str); | ||||
std::string EncodeBase64(const uint8_t *pch, size_t len); | std::string EncodeBase64(const uint8_t *pch, size_t len); | ||||
std::string EncodeBase64(const std::string &str); | std::string EncodeBase64(const std::string &str); | ||||
std::vector<uint8_t> DecodeBase32(const char *p, bool *pfInvalid = nullptr); | std::vector<uint8_t> DecodeBase32(const char *p, bool *pfInvalid = nullptr); | ||||
std::string DecodeBase32(const std::string &str); | std::string DecodeBase32(const std::string &str); | ||||
std::string EncodeBase32(const uint8_t *pch, size_t len); | std::string EncodeBase32(const uint8_t *pch, size_t len); | ||||
std::string EncodeBase32(const std::string &str); | std::string EncodeBase32(const std::string &str); | ||||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |