Skip to main content

Crate pingap_util

Crate pingap_util 

Source

Structs§

IpRules
IpRules stores pre-parsed IP addresses and networks for efficient access control.

Enums§

Error
Error enum for various error types in the utility module

Functions§

aes_decrypt
Decrypts AES-256-GCM-SIV encrypted data using a static nonce.
aes_encrypt
Encrypts data using AES-256-GCM-SIV with a static nonce.
base64_decode
base64_encode
convert_certificate_bytes
Converts an optional certificate string into bytes. Handles PEM format, file paths, and base64-encoded data.
convert_pem
Converts various certificate/key formats into bytes. Supports PEM format, file paths, and base64-encoded data.
format_byte_size
Formats a byte size into a human-readable string (B, KB, MB, GB).
get_pkg_version
Gets the package version.
get_rustc_version
Get the rustc version.
is_pem
Checks if a string represents a PEM-formatted certificate/key by looking for the “—–” prefix.
path_join
Joins two path segments with a forward slash Handles cases where segments already include slashes
resolve_path
Resolves a path string to its absolute form. If the path starts with ‘~’, it will be expanded to the user’s home directory. Returns an empty string if the input path is empty.
toml_omit_empty_value
Removes empty tables/sections from a TOML string