bertlv

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class byte
const (
	Universal       Class = 0b00
	Application     Class = 0b01
	ContextSpecific Class = 0b10
	Private         Class = 0b11
)

type TLV

type TLV struct {
	Tag      Tag
	Value    []byte
	Children []*TLV
}

func NewChildren

func NewChildren(tag Tag, children ...*TLV) *TLV

func NewValue

func NewValue(tag Tag, value []byte) *TLV

func (*TLV) At

func (tlv *TLV) At(index int) *TLV

func (*TLV) BitString

func (tlv *TLV) BitString(definitions ...string) (features []string)

func (*TLV) Bytes

func (tlv *TLV) Bytes() []byte

func (*TLV) Find

func (tlv *TLV) Find(tag Tag) (matches []*TLV)

func (*TLV) First

func (tlv *TLV) First(tag Tag) *TLV

func (*TLV) MarshalBerTLV

func (tlv *TLV) MarshalBerTLV() (_ []byte, err error)

func (*TLV) MarshalJSON

func (tlv *TLV) MarshalJSON() (_ []byte, err error)

func (*TLV) ReadFrom

func (tlv *TLV) ReadFrom(r io.Reader) (n int64, err error)

func (*TLV) Select

func (tlv *TLV) Select(tags ...Tag) *TLV

func (*TLV) UnmarshalBerTLV

func (tlv *TLV) UnmarshalBerTLV(data []byte) (index int, err error)

func (*TLV) UnmarshalJSON

func (tlv *TLV) UnmarshalJSON(data []byte) (err error)

func (*TLV) WriteTo

func (tlv *TLV) WriteTo(w io.Writer) (n int64, err error)

type Tag

type Tag []byte

func (*Tag) Class

func (t *Tag) Class() Class

func (*Tag) Constructed

func (t *Tag) Constructed() bool

func (*Tag) Err

func (t *Tag) Err() error

func (*Tag) MarshalBinary

func (t *Tag) MarshalBinary() ([]byte, error)

func (*Tag) Primitive

func (t *Tag) Primitive() bool

func (*Tag) String

func (t *Tag) String() string

func (*Tag) UnmarshalBinary

func (t *Tag) UnmarshalBinary(b []byte) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL