Expand description
Utility functions for data manipulation.
This module provides helper functions for encoding, decoding, and secure memory operations.
Functionsยง
- bytes_
to_ int_ be - Convert big-endian bytes to an integer.
- bytes_
to_ int_ le - Convert little-endian bytes to an integer.
- concat
- Concatenate multiple byte slices.
- from_
base64 - Convert base64 string to bytes.
- from_
base64url - Convert URL-safe base64 string to bytes.
- from_
hex - Convert hexadecimal string to bytes.
- int_
to_ bytes_ be - Convert an integer to big-endian bytes.
- int_
to_ bytes_ le - Convert an integer to little-endian bytes.
- pad_
pkcs7 - Apply PKCS#7 padding.
- secure_
clear - Securely zero a vector and clear it.
- secure_
compare - Constant-time comparison of two byte slices.
- secure_
zero - Securely zero a byte slice.
- to_
base64 - Convert bytes to base64 string.
- to_
base64url - Convert bytes to URL-safe base64 string (no padding).
- to_hex
- Convert bytes to hexadecimal string.
- to_
hex_ upper - Convert bytes to uppercase hexadecimal string.
- try_
xor_ bytes - Try to XOR two byte slices, returning an error if lengths differ.
- unpad_
pkcs7 - Remove PKCS#7 padding.
- xor_
bytes - XOR two byte slices of equal length.