https://github.com/constantin9845/base64encoder
Base64 encoder. Convert from and to base64 from text and binary data.
https://github.com/constantin9845/base64encoder
base64 base64-decoding base64-encoding
Last synced: 18 days ago
JSON representation
Base64 encoder. Convert from and to base64 from text and binary data.
- Host: GitHub
- URL: https://github.com/constantin9845/base64encoder
- Owner: constantin9845
- Created: 2024-07-12T09:34:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-31T05:41:03.000Z (almost 2 years ago)
- Last Synced: 2025-03-02T13:32:56.524Z (over 1 year ago)
- Topics: base64, base64-decoding, base64-encoding
- Language: C++
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Base 64 Encoder
A c++ library to convert text/binary data to base64 and reverse.
## Usage
The library has five available functions for the user
```java
// Convert string to base64
std::string B = "test string";
std::string result1 = base64::toBase64(B);
```
```java
// Takes a string representing a binary number
// Converts to base64
std::string C = "0111010001100101011100110111010000100000011100110111010001110010011010010110111001100111";
std::string result2 = base64::binaryToBase64(C);
```
```java
// Convert base64 string to a boolean vector
// represent the data in binary
std::vector decode1 = base64::bitsVector(result1);
```
```java
// Convert base64 string to text in binary format
std::string decode2 = base64::binaryString(result1);
```
```java
// Convert base64 string to text format
std::string decode3 = base64::text(result1);
```
## Additional guidelines
Invalid characters in base64 data will be skipped in conversion to text
-No errors
## Example
```java
#include "base64.h"
int main(){
std::string B = "test string";
std::string result1 = base64::toBase64(B);
std::cout<<"From text: "<