Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · base64

Docs

std/base64

On this page

Index

Types

Base64

enum Base64 {
  Std
  Url
  RawStd
  RawUrl
}

RFC 4648 section 4 (Std, +/) and section 5 (Url, -_); the Raw forms write and read no = padding.

Source: std/base64.xo:8

DecodeErr

struct DecodeErr {
  at: Int
}

Displays as Go’s CorruptInputError: illegal base64 data at input byte 4.

Source: std/base64.xo:16

DecodeErr.display

fn (e: DecodeErr) display() -> Str

Source: std/base64.xo:20

Functions

encode

fn encode(data: Bytes, enc: Base64 = Base64.Std) -> Str

Source: std/base64.xo:22

decode

fn decode(s: Str, enc: Base64 = Base64.Std) -> Bytes ! DecodeErr

\r and \n are skipped; anything else outside the alphabet, or padding where the encoding has none, is DecodeErr at its byte offset.

Source: std/base64.xo:25

↑ index