Expand description
A reversible XOR keystream layer — obfuscation, NOT encryption.
⚠️ This is not secure and must not be used for confidentiality. It XORs the
payload with a keystream derived from a u64 key. That hides bytes from a casual
glance and is exactly reversible, but a static-key XOR stream is trivially
broken: any known plaintext recovers the keystream, two messages under one key
XOR to reveal each other, and there is no authentication of the result. For
real confidentiality use a vetted authenticated-encryption (AEAD) construction. This layer exists
to demonstrate the honest limit of XOR: a reversible, unsafe-free transform that
noha can hold at 100% mutation coverage — which proves it is correct and
reversible, NOT that it is secret.
mask is its own inverse: masking twice with the same key returns the input.
Enums§
- Obfuscate
Error - What can go wrong.
Functions§
- mask
- XOR
datawith the keystream forkey, writing toout; returns the length (alwaysdata.len()). Reversible:mask(mask(x, k), k) == x. Obfuscation only — see the module docs; this provides no real confidentiality.