Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkwonn/base64
CLI Project #4
https://github.com/tkwonn/base64
base64 bitwise-oprations cli
Last synced: 12 days ago
JSON representation
CLI Project #4
- Host: GitHub
- URL: https://github.com/tkwonn/base64
- Owner: tkwonn
- Created: 2022-11-17T21:48:12.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T07:47:32.000Z (about 1 month ago)
- Last Synced: 2024-12-09T08:32:32.715Z (about 1 month ago)
- Topics: base64, bitwise-oprations, cli
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Base64 Encoder/Decoder
Simple command-line base64 encoder/decoder written in C.
This project was created to familiarize myself with:- Parsing command-line arguments
- File input/output
- Error handling
- Binary data manipulation and bitwise operations
- Understanding base64 in web development## Demo
[![asciicast](https://asciinema.org/a/rdYjEroQStpuiQc9iiFbx5tI0.svg)](https://asciinema.org/a/rdYjEroQStpuiQc9iiFbx5tI0)
## base64enc.c
- Converts binary/text data to base64 encoded format
- Wraps output at 76 characters per line
- Handles padding with '=' characters as needed## base64dec.c
- Decodes base64 encoded data back to original format
- Validates input format and padding## Installation
```bash
make # Build both encoder and decoder
make clean # Remove generated files
```## Usage
**Encoding**
```bash
./base64enc [FILE] # Encode file to base64
./base64enc < input.txt # Encode from stdin
```**Decoding**
```bash
./base64dec [FILE] # Decode base64 file
./base64dec < encoded.txt # Decode from stdin
```