forked from rebol/rebol
-
Notifications
You must be signed in to change notification settings - Fork 2
Checksum
angerangel edited this page Mar 15, 2013
·
1 revision
CHECKSUM data /part length /tcp /secure /hash size /method word /key key-value
Computes a checksum, CRC, or hash.
CHECKSUM is a native value.
- data -- Bytes to checksum (binary!)
-
/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"
] ]