Base64 library#

The base64 Module#

base64-encode Function#

Return an encoded <byte-string> in base 64.

Signature:

base64-encode (string, #key encoding) => (string)

Parameters:
  • string – An instance of <byte-string>

  • encoding (#key) – Either #"standard" or #"http", default #"standard".

Values:
Example:
let original-string = "Many hands make light work";
base64-encode(original-string);

// Returns "TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu"
base64-decode Function#

Return an decoded <byte-string> from an encoded one.

Signature:

base64-encode (string, #key encoding) => (string)

Parameters:
  • string – An instance of <byte-string>

  • encoding (#key) – Either #"standard" or #"http", default #"standard".

Values:
Example:
base64-decode("TWFueSBoYW5kcyBtYWtlIGxpZ2h0IHdvcmsu");

// Returns "Many hands make light work"