OxL Reference

method base64.decodeUrl

URL-safe alphabet; padding is optional.

Example:

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

fn main() io {
  print(textOf(&base64.decodeUrl("aGk")!)!)
}
Output
hi
pub(api) static fn decodeUrl(text: str) -> bytes | DecodeError

Complexity. O(n).

Since. 1.0.0-beta

Parameters

NameType
textstr

Returns

bytes

Errors

  • DecodeError @error
  • `DecodeError` when the text has characters outside the URL-safe alphabet.

Effects

none declared (pure unless the body says otherwise)

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

See also