obfuscate 1.0.1
obfuscate: ^1.0.1 copied to clipboard
Dart CLI tool and library for text obfuscation and deobfuscation using custom mapping, Base64, ROT13, XOR, and string reversal.
1.0.1 #
- resolved Pub analyzer warning
1.0.0 #
Redesigned the codec architecture.Old data and old code both keep working:
Added
SubstitutionCodecandTokenSubstitutionCodec— typed replacements for the old character-map obfuscation, split by whether a map goes char-to-char or char-to-wordNibbleCodec— safely applies any codec to raw bytes, not just text.validateMap()— checks a map for duplicate values, empty entries, and risky characters (like combining marks) before you use it.VersionedObfuscationMethod— lets you decode both old- and new-format data through one call, based on an explicit version rather than guessing.- Proper exceptions (
ObfuscationExceptionand subtypes) instead of silent failures.
Fixed
- XOR obfuscation could corrupt data when writing to UTF-8 (invalid surrogate sequences for some key/input combos). Now operates on bytes and outputs base64.
- Map-based obfuscation inserted a stray delimiter between every character and silently ate original whitespace on decode.
deobfuscateBase64used to return the input unchanged on a bad decode instead of signaling failure.
Deprecated
- The old static
Obfuscateclass (obfuscateBase64,obfuscateWithMap, etc.) is deprecated but still works exactly as before — no code changes required.
Compatibility
- Data obfuscated with 0.0.1 still decodes correctly via
LegacyMapCodecand the deprecatedObfuscatemethods. - New code should use the codec classes above instead.
0.0.1 #
- Initial version.