Function in encoding coil-stdlib

encode

fn encode(Vec<byte> data) -> string
Import
use encoding::{encode};
Source: src/encoding.hy

Encodes data as standard Base64 (RFC 4648 alphabet, with = padding).

Parameters#

NameType
dataVec<byte>

Returns#

string

Examples#

use encoding::{encode};
use tests::assert;
assert!(encode("hello") == "aGVsbG8=");

See also#

  • decode: Decodes standard Base64 text into bytes.
↑ ↓ navigate ↵ open