Hi Eric, > have an entire loadable module of various > checksum algorithms (CRC, md5sum, sha1sum, sha256sum, ...), as part of > the (eventual) m4 2.0 release that supports loadable modules.
That would make sense, too, indeed. But I would drop SHA-1 at this point, because this algorithm is nowadays no longer considered cryptographically secure (see <http://en.wikipedia.org/wiki/SHA-1> for the history). > What exactly are you trying to achieve? Maybe there is an alternative > algorithm that would still let you do collision detection, without > having to do full-blown hashing. The autoconf notion of m4_set is a > rather powerful example of using multiple m4_defines within a > well-isolated namespace of macro names in order to avoid collisions > within a set Indeed, the use-cases are similar. The essential difference is that the hash keys produced by md5sum can be serialized outside m4, used as AC_SUBSTed variable names, used as file names for some content, and so on. Whereas with m4_set the scope is limited to a single running m4 process. Bruno