proc doDecodeType7password {en} { set ky "647366643b6b666f412c2e69796577726b6c644a4b4448535542" set ps [string range $en 0 1] set en [string range $en 2 666] set en [string tolower $en] set ps [expr $ps*2] set de "" for {} {[string length $en]>0} {} { set a "0x[string range $en 0 1]" set en [string range $en 2 666] set b "0x[string range $ky $ps [expr $ps+1]]" set ps [expr ($ps+2) % 52] set a [expr [expr $a] ^ [expr $b]] set de "$de[format "%c" $a]" } return "$de" } puts "-->[doDecodeType7password 0616]<--"