Skip to content
FutureBlitz

    Install

    Import std.crypto.checksums

    Crc32

    std.crypto.checksums

    class

    Public Class Crc32

    CRC-32 of what's added in turn, a bit at a time, with the reversed polynomial 0xEDB88320.

    Examples

    Expect(Crc32.Hash("123456789") == 0xCBF43926)
    Local crc = Crc32()
    crc.Add("12345")
    crc.Add("6789")
    Expect(crc.Finish() == 0xCBF43926)

    std/crypto/checksums.fb, line 30

    • Public New() constructor #

      A new Crc32, of nothing.

    • Public Static Method Hash(data: UInt8[]): UInt32 static method #

      The CRC-32 of data.

    • Public Static Method Hash(text: String): UInt32 static method #

      The CRC-32 of text's UTF-8 bytes.

    • Public Method Add(data: UInt8[]) method #

      Adds data to what it checks.

    • Public Method Add(text: String) method #

      Adds text's UTF-8 bytes to what it checks.

    • Public Method Finish(): UInt32 method #

      The CRC of what was added, after which it starts again, empty.

    Report an issue with this page or with FutureBlitz on GitHub.