// Generated by Lisette bindgen
// Source: hash/crc32 (Go stdlib)
// Go: 1.25.10
// Lisette: 0.3.0

import "go:hash"

/// Checksum returns the CRC-32 checksum of data
/// using the polynomial represented by the [Table].
pub fn Checksum(data: Slice<byte>, tab: Ref<Table>) -> uint32

/// ChecksumIEEE returns the CRC-32 checksum of data
/// using the [IEEE] polynomial.
pub fn ChecksumIEEE(data: Slice<byte>) -> uint32

/// MakeTable returns a [Table] constructed from the specified polynomial.
/// The contents of this [Table] must not be modified.
pub fn MakeTable(poly: uint32) -> Ref<Table>

/// New creates a new [hash.Hash32] computing the CRC-32 checksum using the
/// polynomial represented by the [Table]. Its Sum method will lay the
/// value out in big-endian byte order. The returned Hash32 also
/// implements [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to
/// marshal and unmarshal the internal state of the hash.
pub fn New(tab: Ref<Table>) -> hash.Hash32

/// NewIEEE creates a new [hash.Hash32] computing the CRC-32 checksum using
/// the [IEEE] polynomial. Its Sum method will lay the value out in
/// big-endian byte order. The returned Hash32 also implements
/// [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to marshal
/// and unmarshal the internal state of the hash.
pub fn NewIEEE() -> hash.Hash32

/// Update returns the result of adding the bytes in p to the crc.
pub fn Update(crc: uint32, tab: Ref<Table>, p: Slice<byte>) -> uint32

/// Table is a 256-word table representing the polynomial for efficient processing.
pub struct Table(Slice<uint32>)

/// Predefined polynomials.
pub const Castagnoli = 0x82f63b78

/// Predefined polynomials.
pub const IEEE = 0xedb88320

/// Predefined polynomials.
pub const Koopman = 0xeb31d82e

/// The size of a CRC-32 checksum in bytes.
pub const Size = 4

/// IEEETable is the table for the [IEEE] polynomial.
pub var IEEETable: Ref<Table>
