a small, self-contained encrypted asset bundler:
- Recursively packs all files from
assets/into a encrypted.binusing AES-256-GCM - Generates and saves a 256-bit encryption key to
assets.key - Encryption AAD (based on asset item file path) plus package-wide AAD (based on
.binfile path) - Runtime loader decrypts assets (textures, bytes, etc.) in the package
- Zero external dependencies
- AES-256-GCM with random IVs per chunk
- Simple JSON index encrypted inside the package
odin build demo -out:opacker./opackerIt will:
- Scan the
assets/folder - Encrypt everything with a random key
- Write
assets.key- don't ship it with the game! - Produce
assets.bin
Demo:
Packed: assets/cloud.png (12345 bytes)
...
Asset package created: assets.bin (987654 bytes total)
Loaded assets/cloud.png with dimensions 512x512
- Encryption is industry standard AES-256-GCM
- Package filename is used as AAD for the header and index
- Each asset uses full path as extra AAD → renaming or moving files inside the package will fail decryption
- Not military-grade obfus, but will stop the casual ripper
- Do not ship
assets.keywith release
- Compression before encryption
- Decompression after decryption
- Streaming en/decryption for large assets
- Mem-map package instead of loading all at once
Made with ❤️ under MIT by algoboyz