Skip to main content

Module b64

Module b64 

Source
Expand description

Strict base64url without padding (specification §2).

Decoding rejects padding, characters outside the URL-safe alphabet and non-canonical encodings (non-zero trailing bits). Every binary value in JSON goes through here.

Modules§

bytes
#[serde(with = "crate::b64::bytes")] for a Vec<u8> field.

Structs§

B64Error
The input is not canonical base64url without padding.

Functions§

decode
Decodes canonical base64url without padding.
decode_array
Decodes exactly N bytes.
encode
Encodes bytes as base64url without padding.
encoded_len
The length of the unpadded encoding of n bytes.