sec_digest_string

one of the documented procedures in this installation of the ACS
Usage:
sec_digest_string   str
What it does:
Digests a string into eight ASCII characters (horribly insecurely). This is fed to ns_crypt to help generate random data.
Defined in: /web/philip/packages/acs-core/security-procs.tcl

Source code:


    set chars [list 32 32 32 32 32 32 32 32]
    for { set i 0 } { $i < [string length $str] } { incr i } {
	scan [string index $str $i] "%c" chr
	set index [expr { $i % 8 }]
	set chars [lreplace $chars $index $index [expr { [lindex $chars $index] + $chr }]]
    }
    foreach chr $chars {
	append out [format "%c" [expr { $chr % 93 + 33 }]]
    }
    return $out


philg@mit.edu