file checksum?
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Sep 30 15:40:56 UTC 2013
On Mon, Sep 30, 2013 at 11:13:34AM -0400, William Park wrote:
> I would like to do some kind of "checksum" on files (full or partial
> content) in order to catch unwanted changes (accidental or malicious).
> How would you do it?
>
> So far, I found
> - MD/SHA digests from OpenSSL -- I'm worried about speed, and being
> dependent on yet another library.
> - crypt() from glibc -- It can do MD5/SHA, but it has to be a single
> string. It can't do multiple strings.
>
> Is there user-callable CRC routines in glibc? Curiously, I can't find
> one, even though I'm told that TCP stack uses it internally.
New hashes come out, so something that changes often like libssl is
probably a better place to put them than the system's libc.
Also libssl is a heavy user of them.
So as far as I know, libssl is your best bet for getting access to lots
of hash functions. Of course programs like md5sum, just have their
own implementation.
Also lots of perl modules seem to exist for various hashes. Certainly
'shasum' on my system is a perl script.
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list