Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for parseTagAndLength (0.18 sec)

  1. src/encoding/asn1/asn1.go

    type RawContent []byte
    
    // Tagging
    
    // parseTagAndLength parses an ASN.1 tag and length pair from the given offset
    // into a byte slice. It returns the parsed data and the new offset. SET and
    // SET OF (tag 17) are mapped to SEQUENCE and SEQUENCE OF (tag 16) since we
    // don't distinguish between ordered and unordered objects in this code.
    func parseTagAndLength(bytes []byte, initOffset int) (ret tagAndLength, offset int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  2. src/encoding/asn1/marshal.go

    	}
    
    	dst = appendTwoDigits(dst, offsetMinutes/60)
    	dst = appendTwoDigits(dst, offsetMinutes%60)
    
    	return dst
    }
    
    func stripTagAndLength(in []byte) []byte {
    	_, offset, err := parseTagAndLength(in, 0)
    	if err != nil {
    		return in
    	}
    	return in[offset:]
    }
    
    func makeBody(value reflect.Value, params fieldParameters) (e encoder, err error) {
    	switch value.Type() {
    	case flagType:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. src/encoding/asn1/asn1_test.go

    	{[]byte{0x1f, 0x1e, 0x00}, false, tagAndLength{}},
    }
    
    func TestParseTagAndLength(t *testing.T) {
    	for i, test := range tagAndLengthData {
    		tagAndLength, _, err := parseTagAndLength(test.in, 0)
    		if (err == nil) != test.ok {
    			t.Errorf("#%d: Incorrect error result (did pass? %v, expected: %v)", i, err == nil, test.ok)
    		}
    		if err == nil && !reflect.DeepEqual(test.out, tagAndLength) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 29 18:24:36 UTC 2023
    - 43.6K bytes
    - Viewed (0)
Back to top