Binary and Encoding Modules
binascii
Perform low-level conversions between binary data and ASCII formats, including hex and base64, and compute CRC checksums. For general base64 workflows prefer base64. CRC32 detects accidental changes but does not authenticate data.
Formal Syntax & Structure
python syntaxpython
import binasciiReturn Value
module
Module namespace available through import; import is a statement, not a value-returning expression.
Working Example
Example Snippetpython
import binasciiprint(binascii.hexlify(bytes([0, 255])))print(binascii.unhexlify(b"00ff"))