2021-01-17 21:36:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <optional>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace BareMinimumCrypto {
|
|
|
|
using namespace std;
|
|
|
|
|
2021-01-20 01:31:41 +00:00
|
|
|
typedef vector <uint8_t> Bytes;
|
|
|
|
|
|
|
|
Bytes copy_to_bytes (const string & s);
|
2021-01-17 21:36:56 +00:00
|
|
|
|
|
|
|
// Not sure why the Base64 lib fails to provide this API
|
2021-01-20 01:31:41 +00:00
|
|
|
string base64_encode (const Bytes & v);
|
|
|
|
optional <Bytes> base64_decode (const string & s);
|
2021-01-17 21:58:35 +00:00
|
|
|
|
|
|
|
int test_base64 ();
|
2021-01-17 21:36:56 +00:00
|
|
|
}
|