This module provides a various routines for computing checksums.
require("chksum")
to load it.
Compute an MD5 sum for a string
String_Type md5sum (BString_Type bstr)
The md5sum
function computes the MD5 checksum for the
specified binary string. The function returns a string representing
the hexadecimal representation of the checksum.
md5sum_file, sha1sum
Compute the MD5 sum for the contents of a file
String_Type md5sum_file (String_Type|File_Type f)
The md5sum_file
computes the MD5 sum on the contents of a
file. The file may either be specified as a string giving the name
of the file, or as an open stdio File_Type
pointer. The
function returns a string representing the hexadecimal
representation of the checksum.
md5sum, sha1sum_file, sha1sum
Compute the SHA1 sum for a string
String_Type sha1sum (BString_Type bstr)
The sha1sum
function computes the SHA1 checksum for the
specified binary string. The function returns a string representing
the hexadecimal representation of the checksum.
sha1sum_file, md5sum
Compute the SHA1 sum for the contents of a file
String_Type sha1sum_file (String_Type|File_Type f)
The sha1sum_file
computes the SHA1 sum on the contents of a
file. The file may either be specified as a string giving the name
of the file, or as an open stdio File_Type
pointer. The
function returns a string representing the hexadecimal
representation of the checksum.
sha1sum, md5sum_file, md5sum