Posted to tcl by evilotto at Tue Feb 28 01:45:39 GMT 2017view pretty

proc hashit {s} {
    set i 0
    foreach {c} [split $s ""] {
        set i [expr {(33 * $i ^ [scan $c %c]) & 0xffffffff}]
    }
    format %08x $i
}