Module util

Source
Expand description

Utility functions for the Common Access Token library.

This module provides various utility functions used throughout the library:

  • Base64 encoding and decoding
  • Random string generation
  • Time-related functions

These functions are primarily used internally by other modules but may also be useful for applications working with CAT tokens.

Functionsยง

current_time_secs
Gets the current time in seconds since the UNIX epoch
from_base64_url
Decodes base64 URL-safe format (with or without padding) to binary data
generate_random_hex
Generates a random hex string of the specified length
to_base64_no_padding
Encodes binary data to base64 URL-safe format without padding