md5sum

 SYNOPSIS
  Compute an MD5 sum for a string

 USAGE
  String_Type md5sum (BString_Type bstr)

 DESCRIPTION
  The `md5sum' function computes the MD5 checksum for the
  specified binary string.  The function returns a string representing
  the hexadecimal representation of the checksum.

 SEE ALSO
  md5sum_file, sha1sum

--------------------------------------------------------------

md5sum_file

 SYNOPSIS
  Compute the MD5 sum for the contents of a file

 USAGE
  String_Type md5sum_file (String_Type|File_Type f)

 DESCRIPTION
  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.

 SEE ALSO
  md5sum, sha1sum_file, sha1sum

--------------------------------------------------------------

sha1sum

 SYNOPSIS
  Compute the SHA1 sum for a string

 USAGE
  String_Type sha1sum (BString_Type bstr)

 DESCRIPTION
  The `sha1sum' function computes the SHA1 checksum for the
  specified binary string.  The function returns a string representing
  the hexadecimal representation of the checksum.

 SEE ALSO
  sha1sum_file, md5sum

--------------------------------------------------------------

sha1sum_file

 SYNOPSIS
  Compute the SHA1 sum for the contents of a file

 USAGE
  String_Type sha1sum_file (String_Type|File_Type f)

 DESCRIPTION
  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.

 SEE ALSO
  sha1sum, md5sum_file, md5sum

--------------------------------------------------------------

crc8sum

 SYNOPSIS
  Compute an 8 bit CRC on a string

 USAGE
  UChar_Type crc8sum (BString_Type bstr)

 DESCRIPTION
  This function computes an 8 bit CRC for the specified string.  A
  number of variants that differ according to the polynomial, initial
  value (seed), input/output bit reflection, and the XOR out value.
  Supported variants include:

   cdma2000  ; poly=0x9B, seed=0xFF, refin=0, refout=0, xorout=0x00
   darc      ; poly=0x39, seed=0x00, refin=1, refout=1, xorout=0x00
   dvb-s2    ; poly=0xD5, seed=0x00, refin=0, refout=0, xorout=0x00
   ebu       ; poly=0x1D, seed=0xFF, refin=1, refout=1, xorout=0x00
   i-code    ; poly=0x1D, seed=0xFD, refin=0, refout=0, xorout=0x00
   itu       ; poly=0x07, seed=0x00, refin=0, refout=0, xorout=0x55
   maxim     ; poly=0x31, seed=0x00, refin=1, refout=1, xorout=0x00
   rohc      ; poly=0x07, seed=0xFF, refin=1, refout=1, xorout=0x00
   wcdma     ; poly=0x9B, seed=0x00, refin=1, refout=1, xorout=0x00

 The CRC-8 algorithm is specified via qualifiers.  The following
 specify the same CRC-8 algorthm:

   crc8 = crc8sum ("string" ; type="maxim");
   crc8 = crc8sum ("string" ; poly=0x31, refin=1, refout=1);

  The default CRC-8 algorithm is "dvb-s2".

 EXAMPLE
  This example shows how to compute the Maxim CRC-8 value on a file.

    fp = fopen (file, "rb");
    c = chksum_new("crc8"; type="maxim");
    while (-1 != fread_bytes (&buf, 4096, fp)
      c.accumulate (buf);
    crc8 = chksum_close ();


 NOTES
  This function is part of the `chksum' module:

    require("chksum");


 SEE ALSO
  crc16sum, crc32sum, crc8sum_file

--------------------------------------------------------------

crc8sum_file

 SYNOPSIS
  Compute the CRC-8 value for the contents of a file

 USAGE
  UChar_Type crc8sum_file (String_Type|File_Type f)

 DESCRIPTION
  The `crc8sum_file' function computes the CRC-8 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 the 8-bit CRC value.

  Qualifiers are used to specifiy the CRC-8 variant.  See the
  documentation for `crc8sum' function for more information.

 SEE ALSO
  crc8sum, crc32sum_file, sha1sum_file

--------------------------------------------------------------

crc16sum

 SYNOPSIS
  Compute an 16 bit CRC on a string

 USAGE
  UInt16_Type crc16sum (BString_Type bstr)

 DESCRIPTION
  This function computes an 16 bit CRC for the specified string.  A
  number of variants that differ according to the polynomial, initial
  value (seed), input/output bit reflection, and the XOR out value.
  Supported variants include:

  ccitt-0    ; poly=0x1021U, seed=0xFFFFU, refin=0, refout=0, xorout=0x0000U
  arc        ; poly=0x8005U, seed=0x0000U, refin=1, refout=1, xorout=0x0000U
  aug-ccitt  ; poly=0x1021U, seed=0x1D0FU, refin=0, refout=0, xorout=0x0000U
  buypass    ; poly=0x8005U, seed=0x0000U, refin=0, refout=0, xorout=0x0000U
  cdma2000   ; poly=0xC867U, seed=0xFFFFU, refin=0, refout=0, xorout=0x0000U
  dds-110    ; poly=0x8005U, seed=0x800DU, refin=0, refout=0, xorout=0x0000U
  dect-r     ; poly=0x0589U, seed=0x0000U, refin=0, refout=0, xorout=0x0001U
  dect-x     ; poly=0x0589U, seed=0x0000U, refin=0, refout=0, xorout=0x0000U
  dnp        ; poly=0x3D65U, seed=0x0000U, refin=1, refout=1, xorout=0xFFFFU
  en-13757   ; poly=0x3D65U, seed=0x0000U, refin=0, refout=0, xorout=0xFFFFU
  genibus    ; poly=0x1021U, seed=0xFFFFU, refin=0, refout=0, xorout=0xFFFFU
  maxim      ; poly=0x8005U, seed=0x0000U, refin=1, refout=1, xorout=0xFFFFU
  mcrf4xx    ; poly=0x1021U, seed=0xFFFFU, refin=1, refout=1, xorout=0x0000U
  riello     ; poly=0x1021U, seed=0xB2AAU, refin=1, refout=1, xorout=0x0000U
  t10-dif    ; poly=0x8BB7U, seed=0x0000U, refin=0, refout=0, xorout=0x0000U
  teledisk   ; poly=0xA097U, seed=0x0000U, refin=0, refout=0, xorout=0x0000U
  tms37157   ; poly=0x1021U, seed=0x89ECU, refin=1, refout=1, xorout=0x0000U
  usb        ; poly=0x8005U, seed=0xFFFFU, refin=1, refout=1, xorout=0xFFFFU
  a          ; poly=0x1021U, seed=0xC6C6U, refin=1, refout=1, xorout=0x0000U
  kermit     ; poly=0x1021U, seed=0x0000U, refin=1, refout=1, xorout=0x0000U
  modbus     ; poly=0x8005U, seed=0xFFFFU, refin=1, refout=1, xorout=0x0000U
  x-25       ; poly=0x1021U, seed=0xFFFFU, refin=1, refout=1, xorout=0xFFFFU
  xmodem     ; poly=0x1021U, seed=0x0000U, refin=0, refout=0, xorout=0x0000U

 The CRC-16 algorithm is specified via qualifiers.  The following
 specify the same CRC-16 algorthm:

   crc16 = crc16sum ("string" ; type="arc");
   crc16 = crc16sum ("string" ; poly=0x8005U, refin=1, refout=1);

  The default CRC-16 algorithm is "ccitt-0".

 EXAMPLE
  This example shows how to compute the Maxim CRC-16 value on a file.

    fp = fopen (file, "rb");
    c = chksum_new("crc16"; type="maxim");
    while (-1 != fread_bytes (&buf, 4096, fp)
      c.accumulate (buf);
    crc16 = chksum_close ();


 NOTES
  This function is part of the `chksum' module:

    require("chksum");


 SEE ALSO
  crc8sum, crc32sum, crc16sum_file

--------------------------------------------------------------

crc16sum_file

 SYNOPSIS
  Compute the CRC-16 value for the contents of a file

 USAGE
  UInt16_Type crc16sum_file (String_Type|File_Type f)

 DESCRIPTION
  The `crc16sum_file' function computes the CRC-16 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 the 16-bit CRC value.

  Qualifiers are used to specifiy the CRC-16 variant.  See the
  documentation for `crc16sum' function for more information.

 SEE ALSO
  crc16sum, crc32sum_file, sha1sum_file

--------------------------------------------------------------

crc32sum

 SYNOPSIS
  Compute an 32 bit CRC on a string

 USAGE
  UInt32_Type crc32sum (BString_Type bstr)

 DESCRIPTION
  This function computes an 32 bit CRC for the specified string.  A
  number of variants that differ according to the polynomial, initial
  value (seed), input/output bit reflection, and the XOR out value.
  Supported variants include:

(default); poly=0x04C11DB7U, seed=0xFFFFFFFFU, refin=1, refout=1, xorout=0xFFFFFFFFU
  bzip2  ; poly=0x04C11DB7U, seed=0xFFFFFFFFU, refin=0, refout=0, xorout=0xFFFFFFFFU
  c      ; poly=0x1EDC6F41U, seed=0xFFFFFFFFU, refin=1, refout=1, xorout=0xFFFFFFFFU
  d      ; poly=0xA833982BU, seed=0xFFFFFFFFU, refin=1, refout=1, xorout=0xFFFFFFFFU
  mpeg-2 ; poly=0x04C11DB7U, seed=0xFFFFFFFFU, refin=0, refout=0, xorout=0x00000000U
  posix  ; poly=0x04C11DB7U, seed=0x00000000U, refin=0, refout=0, xorout=0xFFFFFFFFU
  q      ; poly=0x814141ABU, seed=0x00000000U, refin=0, refout=0, xorout=0x00000000U
  jamcrc ; poly=0x04C11DB7U, seed=0xFFFFFFFFU, refin=1, refout=1, xorout=0x00000000U
  xfer   ; poly=0x000000AFU, seed=0x00000000U, refin=0, refout=0, xorout=0x00000000U

 The CRC-32 algorithm is specified via qualifiers.  The following
 specify the same CRC-32 algorthm:

   crc32 = crc32sum ("string" ; type="posix");
   crc32 = crc32sum ("string" ; poly=0x04C11DB7U, xorout=0xFFFFFFFFU);


 EXAMPLE
  This example shows how to compute the default CRC-32 value on a file.

    fp = fopen (file, "rb");
    c = chksum_new("crc32");
    while (-1 != fread_bytes (&buf, 4096, fp)
      c.accumulate (buf);
    crc32 = chksum_close ();


 NOTES
  This function is part of the `chksum' module:

    require("chksum");


 SEE ALSO
  crc8sum, crc32sum, crc32sum_file

--------------------------------------------------------------

crc32sum_file

 SYNOPSIS
  Compute the CRC-32 value for the contents of a file

 USAGE
  UInt32_Type crc32sum_file (String_Type|File_Type f)

 DESCRIPTION
  The `crc32sum_file' function computes the CRC-32 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 the 32-bit CRC value.

  Qualifiers are used to specifiy the CRC-32 variant.  See the
  documentation for `crc32sum' function for more information.

 SEE ALSO
  crc32sum, crc16sum_file, sha1sum_file

--------------------------------------------------------------
