- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for NewIEEE (0.15 sec)
-
src/hash/crc32/crc32_test.go
func TestCastagnoliRace(t *testing.T) { // The MakeTable(Castagnoli) lazily initializes castagnoliTable, // which races with the switch on tab during Write to check // whether tab == castagnoliTable. ieee := NewIEEE() go MakeTable(Castagnoli) ieee.Write([]byte("hello")) } type test struct { ieee, castagnoli uint32 in string
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 12.1K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
defer timeout(60 * time.Second)() const debug = false var readBytes int var wroteBytes int var readBuf bytes.Buffer var wroteBuf bytes.Buffer readHash := crc32.NewIEEE() wroteHash := crc32.NewIEEE() read := io.Writer(readHash) wrote := io.Writer(wroteHash) if debug { read = io.MultiWriter(read, &readBuf) wrote = io.MultiWriter(wrote, &wroteBuf) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0) -
internal/hash/checksum.go
} // Hasher returns a hasher corresponding to the checksum type. // Returns nil if no checksum. func (c ChecksumType) Hasher() hash.Hash { switch { case c.Is(ChecksumCRC32): return crc32.NewIEEE() case c.Is(ChecksumCRC32C): return crc32.New(crc32.MakeTable(crc32.Castagnoli)) case c.Is(ChecksumSHA1): return sha1.New() case c.Is(ChecksumSHA256): return sha256.New() } return nil }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 08 16:18:34 UTC 2024 - 12.6K bytes - Viewed (0)