2 releases
0.1.1 | Apr 3, 2021 |
---|---|
0.1.0 | Apr 3, 2021 |
#10 in #url-safe
6KB
64 lines
b64url
This is a simple URL-safe Base64 encoder/decoder written in Rust.
Download
Pre-compiled binaries for Linux, Windows and (Intel) macOS are available on the releases page.
Building
If you have Rust and Cargo installed, you can download the source and build it yourself in the regular way:
$ cargo build
Usage
It is designed to be used as a filter and reads the data to be encoded or decoded from standard input.
To encode something:
$ echo "You fight like a dairy Farmer!" | b64url -e
WW91IGZpZ2h0IGxpa2UgYSBkYWlyeSBGYXJtZXIh
To decode something:
$ echo "SG93IGFwcHJvcHJpYXRlLiBZb3UgZmlnaHQgbGlrZSBhIGNvdyE" | b64url -d
How appropriate. You fight like a cow!
The default, if neither -e
nor -d
is given, is to encode the input.
Feedback
This is my first Rust program, so go easy on me :) That being said, feedback, PRs, etc. are most welcome.
Dependencies
~4MB
~71K SLoC