|0.1.3||Nov 1, 2019|
|0.1.2||Sep 23, 2018|
|0.1.1||Aug 3, 2018|
#131 in Encoding
2,724 downloads per month
Used in 1 crate
Rust implementation of useful binascii functions.
- Encode & Decode support for:
- Base16 (Hex)
- no_std support
- never panics
binasciito your package's
[dependencies] binascii = "0.1"
- The API is very simple, head over to https://docs.rs/binascii/.
- This library was written with security in mind, and includes unit tests to prevent vulnerabilities found in many other implementations (many can be found here).
- There are no "unsafe" blocks, such blocks are forbidden.
no-stdis supported for your bare-metal & embedded projects.
This crate contains encoders & decoders for various formats (base16, base32 & base64)
Most functions of this crate work the same way.
use binascii::b32decode; let mut output_buffer = [0u8; 200]; let message = "MJUW4YLTMNUWSLLSOMQGS4ZAORUGKIDCMVZXIII="; let result = b32decode(&message.as_bytes(), &mut output_buffer).ok().unwrap(); assert_eq!(result, "binascii-rs is the best!".as_bytes());