Base64

primitive val Base64

Constructors

create

new val create()
: Base64 val^

Returns


Public Functions

encode_pem

Encode for PEM (RFC 1421).

fun box encode_pem(
  data: ReadSeq[U8 val] box)
: String iso^

Parameters

Returns


encode_mime

Encode for MIME (RFC 2045).

fun box encode_mime(
  data: ReadSeq[U8 val] box)
: String iso^

Parameters

Returns


encode_url[optional A: Seq[U8 val] iso]

Encode for URLs (RFC 4648). Padding characters are stripped by default.

fun box encode_url[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  pad: Bool val = seq)
: A^

Parameters

Returns

  • A^

encode[optional A: Seq[U8 val] iso]

Configurable encoding. The defaults are for RFC 4648.

fun box encode[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  at62: U8 val = seq,
  at63: U8 val = seq,
  pad: U8 val = seq,
  linelen: USize val = seq,
  linesep: String val = seq)
: A^

Parameters

  • data: ReadSeq[U8 val] box
  • at62: U8 val = seq
  • at63: U8 val = seq
  • pad: U8 val = seq
  • linelen: USize val = seq
  • linesep: String val = seq

Returns

  • A^

decode_url[optional A: Seq[U8 val] iso]

Decode for URLs (RFC 4648).

fun box decode_url[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box)
: A^ ?

Parameters

Returns

  • A^ ?

decode[optional A: Seq[U8 val] iso]

Configurable decoding. The defaults are for RFC 4648. Missing padding is not an error. Non-base64 data, other than whitespace (which can appear at any time), is an error.

fun box decode[optional A: Seq[U8 val] iso](
  data: ReadSeq[U8 val] box,
  at62: U8 val = seq,
  at63: U8 val = seq,
  pad: U8 val = seq)
: A^ ?

Parameters

  • data: ReadSeq[U8 val] box
  • at62: U8 val = seq
  • at63: U8 val = seq
  • pad: U8 val = seq

Returns

  • A^ ?

eq

fun box eq(
  that: Base64 val)
: Bool val

Parameters

Returns


ne

fun box ne(
  that: Base64 val)
: Bool val

Parameters

Returns


Private Functions

_enc_byte

Encode a single byte.

fun box _enc_byte(
  i: U8 val,
  at62: U8 val,
  at63: U8 val)
: U8 val ?

Parameters

  • i: U8 val
  • at62: U8 val
  • at63: U8 val

Returns

  • U8 val ?