Can be used for relatively secure Obfuscating/deobfuscating:
* Password/String - via StrDecode/StrEncode
* File/Stream - via StreamDecode/StreamEncode
Rule | Name | Additional |
---|---|---|
function | StrDecode | text method |
function | StrEncode | text method |
sub | StreamDecode | method |
sub | StreamEncode | method |
Decodes (deobfuscates) string that was encoded by StrEncode
ArgStr - encoded string to decode
Encodes (obfuscates) string using random numeric key from 1 to 99
Keeps key encoded as two last bytes
Can be decoded by StrDecode
ArgStr - string to encode
Decodes (deobfuscates) stream that was encoded by StreamEncode
Uses cache for more performant decoding of a same stream in the same session
ArgStm - encoded stream to decode. The stream changed in-place.
Encodes (Obfuscates) stream to save it in unreadable format
Can be used for file saving
Encoded stream contains the following metadata:
* MAC - signature of the stream
* Created on - timestamp of the encoded stream creation
* User - user that initiated encoding
* Transaction - transaction where the encoding took place
ArgStm - stream to encode. Stream is changed in-place.