sha3

Implementations:

  • Pure Tcl: unknown

JMN 2023

Fossil now uses sha3-256 by default. For interoperability with Tcl the sha3 functions would be handy. I'm unaware of any Tcl binary or script implementations - but as a workaround for occasional use, you can exec fossil or sqlite3

        proc sqlite3_sha3 {bits filename} {
            return [exec sqlite3 :memory: "select lower(hex(sha3(readfile('$filename'),$bits)))"]
        }
        proc fossil_sha3 {bits filename} {
            return [lindex [exec fossil sha3sum -$bits $filename] 0]
        }

The fossil version is slower on my system - but do your own tests.

My version of the Tcl sqlite3 library doesn't seem to allow access to the sha3 function. I haven't checked recent versions.


HarmOlthof 2023/12/07: Have you tried: ANKH ? (I haven't, but it has a sha3 implementation)