Crate based64

Source
Expand description

BASE64 library for chads

§Features

  • alloc - Enables usage of heap based collections;

§API

  • raw - Contains functions to work with raw pointers. Mostly unsafe.
  • uninit - Contains functions to work with unintialized slices.
  • vec - Contains high level functions that returns Vec. Requires alloc feature.
  • string - Contains high level functions that returns String. Requires alloc feature.
  • Codec - Wrapper that allows to pre-built lookup table for decoding. Useful if you want to safe tiny bit on building lookup table.

Modules§

raw
Low level functions
string
API that returns String
uninit
Functions to work with uninit memory
vec
High level functions returning vector as convenience

Structs§

Codec
BASE64 codec

Constants§

PAD
Base64 padding character

Statics§

STANDARD_CODEC
Codec which uses STANDARD_TABLE
STANDARD_TABLE
Default character table used by based64
URL_CODEC
Codec which uses URL_TABLE
URL_TABLE
Alternative table URL safe.

Functions§

assert_valid_character_table
Validates custom character table by requiring user to provide table of specific size containing only ASCII characters.
decode
Decoding function writing to slice.
decode_len
Returns number of bytes necessary to decode provided input.
encode
Encoding function writing to slice.
encode_len
Returns number of bytes necessary to encode input of provided size (including padding).