byte

A unit of digital data made of eight bits, enough to store one of 256 values, such as a single plain-text character.

In more detail

Files, keys, hashes and network messages are all sequences of bytes, and their sizes are measured in them: a 256-bit key is 32 bytes. Byte values are often written as two hexadecimal digits, from 00 to ff. In many programming languages, text must be encoded into bytes before it can be hashed or encrypted.

Examples

KEY = bytes(range(32))  # a 32-byte demo key
order = b"pay 1200.00 GBP to account 40300021"

Related terms

Taught in

References

Certification courses