Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for NewIEEE (0.16 sec)

  1. src/hash/crc32/crc32.go

    	}
    	return &digest{0, tab}
    }
    
    // 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.
    func NewIEEE() hash.Hash32 { return New(IEEETable) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. src/hash/marshal_test.go

    var marshalTests = []struct {
    	name   string
    	new    func() hash.Hash
    	golden []byte
    }{
    	{"adler32", func() hash.Hash { return adler32.New() }, fromHex("61646c01460a789d")},
    	{"crc32", func() hash.Hash { return crc32.NewIEEE() }, fromHex("63726301ca87914dc956d3e8")},
    	{"crc64", func() hash.Hash { return crc64.New(crc64.MakeTable(crc64.ISO)) }, fromHex("6372630273ba8484bbcd5def5d51c83c581695be")},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 06 07:45:46 UTC 2017
    - 5.4K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/image/png/reader.go

    // Decode reads a PNG image from r and returns it as an [image.Image].
    // The type of Image returned depends on the PNG contents.
    func Decode(r io.Reader) (image.Image, error) {
    	d := &decoder{
    		r:   r,
    		crc: crc32.NewIEEE(),
    	}
    	if err := d.checkHeader(); err != nil {
    		if err == io.EOF {
    			err = io.ErrUnexpectedEOF
    		}
    		return nil, err
    	}
    	for d.stage != dsSeenIEND {
    		if err := d.parseChunk(false); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
  7. src/image/png/writer.go

    		return
    	}
    	binary.BigEndian.PutUint32(e.header[:4], n)
    	e.header[4] = name[0]
    	e.header[5] = name[1]
    	e.header[6] = name[2]
    	e.header[7] = name[3]
    	crc := crc32.NewIEEE()
    	crc.Write(e.header[4:8])
    	crc.Write(b)
    	binary.BigEndian.PutUint32(e.footer[:4], crc.Sum32())
    
    	_, e.err = e.w.Write(e.header[:8])
    	if e.err != nil {
    		return
    	}
    	_, e.err = e.w.Write(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Checksum", Func, 0},
    		{"ChecksumIEEE", Func, 0},
    		{"IEEE", Const, 0},
    		{"IEEETable", Var, 0},
    		{"Koopman", Const, 0},
    		{"MakeTable", Func, 0},
    		{"New", Func, 0},
    		{"NewIEEE", Func, 0},
    		{"Size", Const, 0},
    		{"Table", Type, 0},
    		{"Update", Func, 0},
    	},
    	"hash/crc64": {
    		{"Checksum", Func, 0},
    		{"ECMA", Const, 0},
    		{"ISO", Const, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg hash/crc32, func Checksum([]uint8, *Table) uint32
    pkg hash/crc32, func ChecksumIEEE([]uint8) uint32
    pkg hash/crc32, func MakeTable(uint32) *Table
    pkg hash/crc32, func New(*Table) hash.Hash32
    pkg hash/crc32, func NewIEEE() hash.Hash32
    pkg hash/crc32, func Update(uint32, *Table, []uint8) uint32
    pkg hash/crc32, type Table [256]uint32
    pkg hash/crc32, var IEEETable *Table
    pkg hash/crc64, const ECMA ideal-int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top