Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
-- calculate CRC-32 checksum
|
||||
str = "The quick brown fox jumps over the lazy dog"
|
||||
|
||||
-- is shared library (in Director called "Xtra", a DLL in windows, a sharedLib in
|
||||
-- OS X) available?
|
||||
if ilk(xtra("Crypto"))=#xtra then
|
||||
|
||||
-- use shared library
|
||||
cx = xtra("Crypto").new()
|
||||
crc = cx.cx_crc32_string(str)
|
||||
|
||||
else
|
||||
|
||||
-- otherwise use (slower) pure lingo solution
|
||||
crcObj = script("CRC").new()
|
||||
crc = crcObj.crc32(str)
|
||||
|
||||
end if
|
||||
Loading…
Add table
Add a link
Reference in a new issue