go/src/crypto/x509/oid.go

var errInvalidOID

type OID

// ParseOID parses a Object Identifier string, represented by ASCII numbers separated by dots.
func ParseOID(oid string) (OID, error) {}

func newOIDFromDER(der []byte) (OID, bool) {}

// OIDFromInts creates a new OID using ints, each integer is a separate component.
func OIDFromInts(oid []uint64) (OID, error) {}

func base128IntLength(n uint64) int {}

func appendBase128Int(dst []byte, n uint64) []byte {}

func base128BigIntLength(n *big.Int) int {}

func appendBase128BigInt(dst []byte, n *big.Int) []byte {}

// AppendText implements [encoding.TextAppender]
func (o OID) AppendText(b []byte) ([]byte, error) {}

// MarshalText implements [encoding.TextMarshaler]
func (o OID) MarshalText() ([]byte, error) {}

// UnmarshalText implements [encoding.TextUnmarshaler]
func (o *OID) UnmarshalText(text []byte) error {}

func (o *OID) unmarshalOIDText(oid string) error {}

// AppendBinary implements [encoding.BinaryAppender]
func (o OID) AppendBinary(b []byte) ([]byte, error) {}

// MarshalBinary implements [encoding.BinaryMarshaler]
func (o OID) MarshalBinary() ([]byte, error) {}

// UnmarshalBinary implements [encoding.BinaryUnmarshaler]
func (o *OID) UnmarshalBinary(b []byte) error {}

// Equal returns true when oid and other represents the same Object Identifier.
func (oid OID) Equal(other OID) bool {}

func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, failed bool) {}

// EqualASN1OID returns whether an OID equals an asn1.ObjectIdentifier. If
// asn1.ObjectIdentifier cannot represent the OID specified by oid, because
// a component of OID requires more than 31 bits, it returns false.
func (oid OID) EqualASN1OID(other asn1.ObjectIdentifier) bool {}

// Strings returns the string representation of the Object Identifier.
func (oid OID) String() string {}

func (oid OID) toASN1OID() (asn1.ObjectIdentifier, bool) {}