Import std.crypto.checksums
std.crypto.checksums
Crc32 and XxHash: fast checksums that aren't cryptographic. They catch accidents, like a file that was cut short or a bit that flipped, but not an attacker, who can make data with any of them; that takes a hash, like Sha256 or Blake3. Crc32 is CRC-32 as zlib, Zip, PNG, and Ethernet have it; XxHash is xxHash's XXH3, 64 bits, with a seed.
std/crypto/checksums.fb
Types
Crc32
class
Public Class Crc32
CRC-32 of what's added in turn, a bit at a time, with the reversed polynomial 0xEDB88320.
std/crypto/checksums.fb, line 19
-
A new Crc32, of nothing yet.
-
The CRC-32 of
data. -
The CRC-32 of
text's UTF-8 bytes. -
Adds
datato what it checks. -
Adds
text's UTF-8 bytes to what it checks. -
The CRC of what was added, after which it starts again, empty.
XxHash
class
Public Class XxHash
XXH3's 64-bit hash of what's added in turn, with a seed, so the same data hashes differently under different seeds.
std/crypto/checksums.fb, line 62
-
A new XxHash, of nothing yet, with
seed. -
XXH3's 64-bit hash of
data, withseed. -
XXH3's 64-bit hash of
text's UTF-8 bytes, withseed. -
Adds
datato what it hashes. -
Adds
text's UTF-8 bytes to what it hashes. -
The hash of what was added, after which it starts again, empty, with its seed.
Report an issue with this page or with FutureBlitz on GitHub.