Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ReadUint16 (0.42 sec)

  1. src/crypto/tls/ech.go

    	// Skip the length prefix
    	var length uint16
    	if !s.ReadUint16(&length) {
    		return nil, errMalformedECHConfig
    	}
    	if length != uint16(len(data)-2) {
    		return nil, errMalformedECHConfig
    	}
    	var configs []echConfig
    	for len(s) > 0 {
    		var ec echConfig
    		ec.raw = []byte(s)
    		if !s.ReadUint16(&ec.Version) {
    			return nil, errMalformedECHConfig
    		}
    		if !s.ReadUint16(&ec.Length) {
    			return nil, errMalformedECHConfig
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/crypto/cryptobyte/string.go

    func (s *String) ReadUint8(out *uint8) bool {
    	v := s.read(1)
    	if v == nil {
    		return false
    	}
    	*out = uint8(v[0])
    	return true
    }
    
    // ReadUint16 decodes a big-endian, 16-bit value into out and advances over it.
    // It reports whether the read was successful.
    func (s *String) ReadUint16(out *uint16) bool {
    	v := s.read(2)
    	if v == nil {
    		return false
    	}
    	*out = uint16(v[0])<<8 | uint16(v[1])
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 10 16:32:44 UTC 2023
    - 5.2K bytes
    - Viewed (0)
Back to top