Checksum

angerangel edited this page Jan 2, 2013 · 1 revision

Table of Contents

USAGE

  CHECKSUM data /part length /tcp /secure /hash size /method word /key key-value

DESCRIPTION

Computes a checksum, CRC, or hash. CHECKSUM is a native value.

ARGUMENTS

  • data -- Bytes to checksum (binary!)

REFINEMENTS

  • /part
    • length -- Length of data
  • /tcp -- Returns an Internet TCP 16-bit checksum
  • /secure -- Returns a cryptographically secure checksum
  • /hash -- Returns a hash value
    • size -- Size of the hash table (integer!)
  • /method -- Method to use
    • word -- Methods: SHA1 MD5 CRC32 (word!)
  • /key -- Returns keyed HMAC value
    • key-value -- Key to use (any-string!)

SOURCE

checksum: make native! [  [
    "Computes a checksum, CRC, or hash."
    data [binary!] "Bytes to checksum"
    /part length "Length of data"
    /tcp "Returns an Internet TCP 16-bit checksum"
    /secure "Returns a cryptographically secure checksum"
    /hash "Returns a hash value"
    size [integer!] "Size of the hash table"
    /method "Method to use"
    word [word!] "Methods: SHA1 MD5 CRC32"
    /key "Returns keyed HMAC value"
    key-value [any-string!] "Key to use"
] ] 
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.