OxL Reference

method base64.decode

Strict Base64 decoding (alphabet, padding and trailing bits are checked).

Example:

oxl✓ checked in CI
use std.crypto { base64 }
use std.ser { textOf }

fn main() io {
  print(textOf(&base64.decode("aGVsbG8=")!)!)
}
Output
hello
pub(api) static fn decode(text: str) -> bytes | DecodeError

Since. 1.0.0-beta

Parameters

NameType
textstr

Returns

bytes

Errors

Effects

none declared (pure unless the body says otherwise)

Defined in: std/crypto/crypto.oxl:382

See also