Add utilities for random nonces/salts and encoding.
Review Request #15173 — Created July 16, 2026 and updated
This introduces new
cryptozoology.utils.encodingand
cryptozoology.utils.randommodules.
encodingprovides utilities for encoding to/decoding from URL-safe
Base64 with padding removed and type checking agdded. It also provides
encoding for length-prefixed strings, which is useful in AAD and HKDF
information.
randomprovides types and generation for nonces and salts of arbitrary
or common sizes.
Unit tests pass.
Made use of these in other changes.