mirror of
https://github.com/inzerosight/ZWUS.git
synced 2026-09-18 02:45:44 +00:00
adc877d7434adfa91b73444353cc91fc124afccf
Zero Width Unicode Standard (ZWUS)
Zero Width Unicode Steganography — hide text inside invisible characters.
npm install zwus
Usage
import zwus from 'zwus';
// Encode & decode strings
const hidden = zwus.encodeString("secret");
const revealed = zwus.decodeToString(hidden);
// "secret"
// Encode & decode number arrays
const encoded = zwus.encodeNumberArray([72, 101, 108]);
const decoded = zwus.decodeToNumberArray(encoded);
// [72, 101, 108]
Base
Higher base = shorter output, but more likely visible in some renderers.
zwus.encodeString("hi", 3) // safest
zwus.encodeString("hi", 6) // default, compact
zwus.encodeString("hi", 8) // most compact
Decode must match the encode base:
zwus.decodeToString(encoded, 6)
Interop
Encoded output is byte-identical to the Rust crate, so you can encode in JS and decode in Rust or vice versa.
License
Browser Extension
You can also use ZWUS in your browser with inØsight: Firefox Add-on · Chrome Web Store
Description
Languages
JavaScript
100%