Sujet : Re: Should I write building blocks?
De : luc (at) *nospam* sep.invalid (Luc)
Groupes : comp.lang.tclDate : 25. Jan 2025, 06:37:06
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250125023706.6b29d7e3@lud1.home>
References : 1 2
On Sat, 25 Jan 2025 03:59:25 -0000 (UTC), Rich wrote:
[1] Don't worry if you don't know what a 'hash function' is right now,
that's not terribly important for this discussion here, and you can
look it up on Wikipedia if you don't know but really want to know.
**************************
Hey, I know what a hash function is. I use it all the time to check the
integrity of ISO images.
In fact, I have written - and shared - a Tcl script that uses it:
set ::hashMethod tcllib
foreach i {sha512sum sha384sum sha256sum sha224sum sha1sum md5sum} {
if {[catch {set ::hashMethod [exec which $i]} _catchError]} {
continue
} else {break}
}
if {$::hashMethod == "tcllib"} {
if {[catch {package require sha256} _catchError]} {
puts "ERROR! Impossible to proceed. Please install at least one of these packages: "
puts "sha512sum, sha384sum, sha256sum, sha224sum, sha1sum, md5sum, or tcllib."
puts "Note: tcllib is considerably slower than all the others."
puts ""
exit
}
}
That was 10 years ago. I wonder if the tcllib implementation has been
optimized since then.
Thank you for all the advice.
-- Luc>