CRC-32: Difference between revisions
m
→{{header|11l}}: `(-)` -> `~`
m (→{{header|Wren}}: Minor tidy) |
Alextretyak (talk | contribs) m (→{{header|11l}}: `(-)` -> `~`) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 33:
F crc32(buf, =crc = UInt32(0))
crc =
L(k) buf
crc = (crc >> 8) (+) :crc_table[(crc [&] F'F) (+) k.code]
R
print(hex(crc32(‘The quick brown fox jumps over the lazy dog’)))</syntaxhighlight>
Line 388:
{{out}}
<pre>0x414fa339</pre>
=={{header|Bait}}==
<syntaxhighlight lang="bait">
import hash.crc32
fun main() {
text := 'The quick brown fox jumps over the lazy dog'
sum := crc32.checksum(text.bytes())
println(sum.hex())
}
</syntaxhighlight>
{{out}}
<pre>
414fa339
</pre>
=={{header|C}}==
|