@OBSCURE — Mangles a text string, making it difficult to read.

Syntax:
%@OBSCURE[text]

texttext to be obfuscated

The input text should be reasonably short, preferably not more than a kilobyte or two. The resulting, mangled string will be longer than the original string, usually by about one-third. The same input text can return different obfuscated text; you cannot meaningfully compare the output from two calls to @OBSCURE. Do not edit or alter the returned text in any way.

If the input text comes from an environment variable, it’s probably a good idea to remove or overwrite that variable as soon as possible after calling @OBSCURE. One way to do this would be to simply store the returned string back in the original variable.

set inifile="%userprofile\Passwords.ini"
input /p Enter password:  %%password
set password=%@obscure[%password]

set rv=%@iniwrite[%inifile,Personal,Password,%password]
unset inifile password


•  Note: This function does not provide secure cryptography! It was designed for ease of use, not for real security. Using @OBSCURE to muddle text will discourage casual snooping, but a sophisticated user can recover the original data easily by passing the obscured text to @CLARIFY. (A determined attacker could also reverse-engineer the algorithm, although that would be a pointless waste of time when the plugin itself is readily available.)

See also: the @CLARIFY function.