#base64 #base32 #base16 #hex

no-std binascii

Useful no-std binascii operations including base64, base32 and base16 (hex)

4 releases

0.1.4 Feb 17, 2020
0.1.3 Nov 1, 2019
0.1.2 Sep 23, 2018
0.1.1 Aug 3, 2018
0.1.0 Aug 1, 2018

#98 in Encoding

Download history 425/week @ 2020-03-12 486/week @ 2020-03-19 478/week @ 2020-03-26 483/week @ 2020-04-02 706/week @ 2020-04-09 674/week @ 2020-04-16 452/week @ 2020-04-23 545/week @ 2020-04-30 589/week @ 2020-05-07 415/week @ 2020-05-14 463/week @ 2020-05-21 768/week @ 2020-05-28 758/week @ 2020-06-04 715/week @ 2020-06-11 441/week @ 2020-06-18 422/week @ 2020-06-25

1,827 downloads per month
Used in libotp

MIT license

19KB
307 lines

binascii

Build Status

Rust implementation of useful binascii functions.

  • Encode & Decode support for:
    • Base16 (Hex)
    • Base32
    • Base64
  • no_std support
  • never panics

Getting Started

  • Add binascii to your package's Cargo.toml:
    [dependencies]
    binascii = "0.1"
    
  • Encoders and decoders are enabled by default. To enable only decoders, use the "decode" feature. To enable only encoders, use the "encode" feature:
    # Enable encoders only.
    [dependencies]
    binascii = { version = "0.1", default-features = false, features = ["encode"] }
    
    # Enable decoders only.
    [dependencies]
    binascii = { version = "0.1", default-features = false, features = ["decode"] }
    
  • The API is very simple, head over to https://docs.rs/binascii/.

Why 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-std is supported for your bare-metal & embedded projects.

No runtime deps

Features

  • decode
  • encode