Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
Base64.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef ENIGMA_BASE64_H
3#define ENIGMA_BASE64_H
4
5#include <Core/Core.hpp>
6
8class Base64 final {
10
11 public:
12 /*
13 * Encodes string bytes into Base64 string
14 * https://www.cryptopp.com/wiki/Base64Encoder
15 */
16 static std::vector<byte> Encode(const std::vector<byte>& buffer);
17 static std::vector<byte> Encode(const byte *buffer, const std::size_t buffLen);
18 static std::string Encode(const std::string& buffer);
19
20 /*
21 * Decodes a Base64 string
22 * https://www.cryptopp.com/wiki/Base64Decoder
23 */
24 static std::vector<byte> Decode(const std::vector<byte>& encoded_buffer);
25 static std::vector<byte> Decode(const byte *buffer, const std::size_t buffLen);
26 static std::string Decode(const std::string& encoded);
27};
29
30#endif // !ENIGMA_BASE64_H
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
#define ENIGMA_STATIC_CLASS(Class)
Makes a class static, which will prevent creating instances from it and only use it as Class::Func()....
Definition Macros.hpp:120
static std::string Encode(const std::string &buffer)
static std::vector< byte > Decode(const std::vector< byte > &encoded_buffer)
static std::vector< byte > Encode(const byte *buffer, const std::size_t buffLen)
static std::vector< byte > Encode(const std::vector< byte > &buffer)
static std::vector< byte > Decode(const byte *buffer, const std::size_t buffLen)
static std::string Decode(const std::string &encoded)