Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for parseObjectIdentifier (0.35 sec)

  1. src/encoding/asn1/asn1.go

    		}
    		s.Write(strconv.AppendInt(buf, int64(v), 10))
    	}
    
    	return s.String()
    }
    
    // parseObjectIdentifier parses an OBJECT IDENTIFIER from the given bytes and
    // returns it. An object identifier is a sequence of variable length integers
    // that are assigned in a hierarchy.
    func parseObjectIdentifier(bytes []byte) (s ObjectIdentifier, err error) {
    	if len(bytes) == 0 {
    		err = SyntaxError{"zero length OBJECT IDENTIFIER"}
    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/asn1_test.go

    	{[]byte{85, 0x02, 0xc0, 0x80, 0x80, 0x80, 0x80}, false, []int{}},
    }
    
    func TestObjectIdentifier(t *testing.T) {
    	for i, test := range objectIdentifierTestData {
    		ret, err := parseObjectIdentifier(test.in)
    		if (err == nil) != test.ok {
    			t.Errorf("#%d: Incorrect error result (did fail? %v, expected: %v)", i, err == nil, test.ok)
    		}
    		if err == nil {
    			if !reflect.DeepEqual(test.out, ret) {
    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