Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BytesOrPanic (0.24 sec)

  1. src/vendor/golang.org/x/crypto/cryptobyte/builder.go

    func (b *Builder) Bytes() ([]byte, error) {
    	if b.err != nil {
    		return nil, b.err
    	}
    	return b.result[b.offset:], nil
    }
    
    // BytesOrPanic returns the bytes written by the builder or panics if an error
    // has occurred during building.
    func (b *Builder) BytesOrPanic() []byte {
    	if b.err != nil {
    		panic(b.err)
    	}
    	return b.result[b.offset:]
    }
    
    // AddUint8 appends an 8-bit value to the byte string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 9.9K bytes
    - Viewed (0)
  2. src/crypto/tls/key_schedule.go

    		b.AddBytes([]byte(label))
    	})
    	hkdfLabel.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) {
    		b.AddBytes(context)
    	})
    	hkdfLabelBytes, err := hkdfLabel.Bytes()
    	if err != nil {
    		// Rather than calling BytesOrPanic, we explicitly handle this error, in
    		// order to provide a reasonable error message. It should be basically
    		// impossible for this to panic, and routing errors back through the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top