The only way I can see of doing something like this would be :
set salt "Whatever"
set plain_pass "hello"
catch { echo $plain_pass | crypt $salt } cpass
set save_pass [string range $save_pass 0 [expr [string length $cpass] -2 ]]
$save_pass would hold the de-cryptable password. To unencrypt it,
just issue another 'catch' script like the above, just substitute $save_pass
for $plain_pass.
Of course, any hacker can just open up this script, figure out the
salt and start cracking away. Only other way to do this would be to
hard-code it into a Tcl addon, or a seperate program.
-Jeff
Mixer was once heard to say.....
[]
[]I am using vtcl to create an app that needs to create an encrypted passwd, I have
"Tcl and the Tk Toolkit" but do not see anywhere in there where I can call crypt as I
would from a perl script, such as:
[]
[]$passwd = crypt(pass,salt);
[]
[]Is there a way to call crypt from Tcl?
[]
[]Chris Hood
[][EMAIL PROTECTED]
[][EMAIL PROTECTED]
[]
[]
[] / There can be only One!
[] *//////{<>==============================================-
[] \ - Highlander
[]
[]
[]
[]---------------------------------------------------------------------------
[]To unsubscribe from the Visual Tcl mailing list, please send a message
[]to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
[]message body (where [EMAIL PROTECTED] is your e-mail address).
[]
--
------------------------------------------------------------------------------
Jeff McCombs Global Internet Network Services
Network Technician ph. (402)436-3030 fax (402)436-4046
email: [EMAIL PROTECTED] [EMAIL PROTECTED] / http://www.gi.net
------------------------------------------------------------------------------
Windows 95: n.
32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit
operating system originally coded for a 4 bit microprocessor, written by a 2
bit company, that can't stand 1 bit of competition.
---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).