@funeste38/nezlephant
v1.0.4
Published
OC8 PNG encode/decode helpers plus Rubik-style block scrambling utilities.
Downloads
115
Readme
@funeste38/nezlephant
nezlephant is the OC8 image payload helper from the Funesterie ecosystem.
It lets you hide small binary payloads inside PNG pixels, decode them back, and optionally scramble image blocks with a stable key-based permutation for visual obfuscation.
Install
npm install @funeste38/nezlephantCore API
encodeToOC8Png(payload, width?, height?)decodeFromOC8Png(pngBuf)scramblePngBlocks(pngBuf, key, blockSize?)unscramblePngBlocks(pngBuf, key, blockSize?)crc8(buf)
Example
const {
encodeToOC8Png,
decodeFromOC8Png,
scramblePngBlocks,
unscramblePngBlocks
} = require('@funeste38/nezlephant');
const payload = Buffer.from('secret-data');
const png = encodeToOC8Png(payload, 16, 16);
const scrambled = scramblePngBlocks(png, 'ma-cle-secrete', 4);
const restored = unscramblePngBlocks(scrambled, 'ma-cle-secrete', 4);
const decoded = decodeFromOC8Png(restored);
console.log(decoded.toString('utf8'));Security Notes
- OC8 is obfuscation, not encryption
- Rubik scrambling is a deterministic permutation, not a cryptographic scheme
- for real confidentiality, encrypt first and encode second
Development
npm install
npm test