Refactor project structure

This commit is contained in:
2026-03-28 19:56:39 +11:00
parent 1d267378b2
commit 8a2e721058
511 changed files with 59 additions and 48 deletions

View File

@@ -0,0 +1,26 @@
#pragma once
#include <string>
#include <vector>
using namespace std;
class BASE32 {
public:
BASE32();
~BASE32();
string encode(unsigned char * input, int len, bool padding = false);
vector<unsigned char> decode(const char * input, int len, int * outlen);
int encode_pad_length(int len, int *pad);
private:
void encode_exactly(const unsigned char *buf, int len, char *encbuf, int enclen);
int decode_into(const char *buf, int len, unsigned char *decbuf, int declen);
int decode_alphabet(const char valmap[], const char *buf, int len, unsigned char *decbuf, int declen, int padding);
static const char values[];
static const char alphabet[];
};