std/encoding/base64

Types

DecodeError

pub type DecodeError = {
    pub text String
}

DecodeError.message

pub fn DecodeError.message(self) -> String

Functions

encode

pub pure fn encode(data: Bytes) -> String

Standard alphabet, padded with '='.

encodeUrl

pub pure fn encodeUrl(data: Bytes) -> String

URL and filename safe alphabet, unpadded.

decode

pub pure fn decode(text: String) -> Result[Bytes, DecodeError]

Bytes of a standard-alphabet string; padding is optional, but a wrong amount of it or nonzero trailing bits are errors.

decodeUrl

pub pure fn decodeUrl(text: String) -> Result[Bytes, DecodeError]

Bytes of a URL-safe string; padding is optional, but a wrong amount of it or nonzero trailing bits are errors.