https://github.com/synacktraa/base64
my implementation of base64 algorithm in C.
https://github.com/synacktraa/base64
base64decoder base64encoder c-language cli-tool
Last synced: 2 months ago
JSON representation
my implementation of base64 algorithm in C.
- Host: GitHub
- URL: https://github.com/synacktraa/base64
- Owner: synacktraa
- License: mit
- Created: 2022-02-25T21:41:27.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-09T11:37:30.000Z (over 3 years ago)
- Last Synced: 2025-07-18T20:04:25.698Z (6 months ago)
- Topics: base64decoder, base64encoder, c-language, cli-tool
- Language: C
- Homepage:
- Size: 73.2 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Base64
---
Small and portable Base64 Converter cli tool written in C.
---
Usage
### Compile
> make
---
### Help
Output:
```terminal
*IMP*: Put space separated data in quotes.
|CLI options|:-
-e - Encodes the data string
-d - Decodes the data string
-i - takes next argument as data string
-f - takes next argument as filename
-o - takes next argument as filename and saves the output in file
(if filename is not given, it defaults to base64Out)
```
---
## Encoding
```bash
./base_64 -e -i "Base64 Converter"
```
Output:
```bash
QmFzZTY0IENvbnZlcnRlcg==
```
---
```bash
./base_64 -e -f infile
```
Output:
```bash
aHR0cHM6Ly9naXRodWIuY29tL1N5bkFja3RyYWE=
```
---
## Decoding
```bash
./base_64 -d -f encoded
```
Output:
```terminal
small portable base64 in C.
```
---
```bash
./base_64 -d -i "U3RhciB0aGlzIHByb2plY3QgOiksIGl0IGJvb3N0cyBteSBlZ28u"
```
Output:
```bash
Star this project :), it boosts my ego.
```
---
### **Redirecting output to a file**
Using the redirection operator↴
```bash
./base_64 -d -i "U3RhciB0aGlzIHByb2plY3QgOiksIGl0IGJvb3N0cyBteSBlZ28u" > out.txt
```
Using the -o argument with a filename↴
```bash
./base_64 -d -f encoded -o out
```
Using the -o argument without a filename↴
```bash
./base_64 -e -f infile -o
```
> ps: "-o" without a parameter uses the default filename 'base64Out'
---
© This tool is based on ASCII charset.
---
## **License**
### MIT
Copyright for portions of project [base64](https://github.com/SynAcktraa/base64) are held by [Github Account [SynAcktraa](https://github.com/SynAcktraa) Owner, 2022] as part of project [base64](https://github.com/SynAcktraa/base64)
All other copyright for project [base64](https://github.com/SynAcktraa/base64) are held by [Github Account [SynAcktraa](https://github.com/SynAcktraa) Owner, 2022].
Check the [LICENSE](LICENSE) for more details.