
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
bytekit
Advanced tools
High-performance buffer transformation, encoding, and binary codec primitives for Python.
pip install bytekit
import bytekit
# XOR encoding
encoded = bytekit.xor(b'hello world', b'key')
decoded = bytekit.xor(encoded, b'key')
# Hex / Base64
hex_str = bytekit.to_hex(b'\xde\xad\xbe\xef')
raw = bytekit.from_hex('deadbeef')
b64 = bytekit.to_base64(b'binary data')
# PKCS7 padding
padded = bytekit.pad_pkcs7(b'short', block_size=16)
original = bytekit.unpad_pkcs7(padded)
# Hashing
digest = bytekit.sha256(b'message')
mac = bytekit.hmac_sha256(b'secret', b'data')
# Binary packing
packed = bytekit.write_uint32_le(0xDEADBEEF)
value = bytekit.read_uint32_le(packed)
# Utilities
chunks = bytekit.split(b'abcdefgh', 3)
rand = bytekit.random_bytes(32)
eq = bytekit.compare(a, b) # constant-time
xor(data, key) — XOR each byte with cycling keyto_hex(buf) / from_hex(str) — hex encode/decodeto_base64(buf) / from_base64(str) — base64to_base32(buf) / from_base32(str) — base32pad(buf, n, byte=0) — right-pad to length npad_pkcs7(buf, block_size=16) / unpad_pkcs7(buf)sha256(buf) / sha256_hex(buf) / md5(buf)hmac_sha256(key, data)crc32(buf)pack(fmt, *values) / unpack(fmt, buf)read_uint32_le/be(buf, offset) / write_uint32_le/be(value)read_uint16_le/be(buf, offset)concat(*parts) / split(buf, n) / chunks(buf, size)rotate_left(buf, k) / rotate_right(buf, k)reverse(buf) / repeat(buf, n)interleave(a, b) / deinterleave(buf, count)mask(data, mask_byte) / fill(size, byte)compare(a, b) — constant-time equalitybit_count(buf) — popcounthamming_distance(a, b)MIT
FAQs
High-performance buffer transformation, encoding, and binary codec primitives
The pypi package bytekit receives a total of 260 weekly downloads. As such, bytekit popularity was classified as not popular.
We found that bytekit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.