added b64 encode/decode to MString.

This commit is contained in:
Brad Arant committed 2025-02-06 14:34:11 -08:00
1 parent d1c450fe48
commit 5e6d162a05
8 files changed
+61 -35

No files matched your search

+6 -4
View File
@@ -1,20 +1,22 @@
#ifndef __Base64_h__
#define __Base64_h__
#include <string>
#include "ZString.h"
#include "MString.h"
namespace coreutils {
///
///
/// Use the Base64 object when you need to translate character string
/// to/from base64 encoded strings.
///
class Base64 {
public:
bool isBase64(unsigned char c);
std::string encode(unsigned char const* bytes_to_encode, unsigned int in_len);
std::string decode(std::string const& encoded_string);
MString encode(ZString data);
MString decode(ZString b64data);
};