hbutils.encoding
Encoding utilities for ANSI formatting, base64, decoding, and hashing.
This package-level module aggregates a collection of encoding/decoding helpers
from submodules under hbutils.encoding. It re-exports their public APIs
for convenient access, covering the following areas:
ANSI escape code handling for terminal styling (
hbutils.encoding.ansi)Base64 encoding and decoding (
hbutils.encoding.base64)Automatic decoding helpers (
hbutils.encoding.decode)Cryptographic hash wrappers (
hbutils.encoding.hash)Non-cryptographic integer hash algorithms (
hbutils.encoding.int_hash)Hash validation utilities (
hbutils.encoding.int_hash_val)
The module itself does not define functions or classes directly. Instead, it acts as a unified import surface for the encoding toolkit.
Example:
>>> from hbutils.encoding import md5, sha256
>>> md5(b'hello world')
'5eb63bbbe01eeed093cb22bb8f5acdc3'
>>> sha256(b'hello world')
'b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9'
>>> from hbutils.encoding import int_hash
>>> int_hash("hello", method='FNV-1a-32')
1335831723
Note
All public names from the listed submodules are re-exported. Refer to the respective submodule documentation for detailed usage and parameter descriptions.
- hbutils.encoding.ansi
- hbutils.encoding.base64
- hbutils.encoding.decode
- hbutils.encoding.hash
- hbutils.encoding.int_hash
- hbutils.encoding.int_hash_val
- __all__
- DeterminismValidationResult
- TypeConsistencyValidationResult
- AvalancheEffectValidationResult
- UniformDistributionValidationResult
- CollisionResistanceValidationResult
- EmptyInputValidationResult
- PerformanceValidationResult
- ComprehensiveValidationResult
- int_hash_val_determinism
- int_hash_val_type_consistency
- int_hash_val_avalanche_effect
- int_hash_val_uniform_distribution
- int_hash_val_collision_resistance
- int_hash_val_empty_input
- int_hash_val_performance
- int_hash_val_comprehensive