ber

package
v0.0.0-...-521b610 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLASS_MASK uint8 = 0xC0
	CLASS_UNIV       = 0x00
	CLASS_APPL       = 0x40
	CLASS_CTXT       = 0x80
	CLASS_PRIV       = 0xC0
)
View Source
const (
	PC_MASK      uint8 = 0x20
	PC_PRIMITIVE       = 0x00
	PC_CONSTRUCT       = 0x20
)
View Source
const (
	TAG_MASK            uint8 = 0x1F
	TAG_BOOLEAN               = 0x01
	TAG_INTEGER               = 0x02
	TAG_BIT_STRING            = 0x03
	TAG_OCTET_STRING          = 0x04
	TAG_OBJECT_IDENFIER       = 0x06
	TAG_ENUMERATED            = 0x0A
	TAG_SEQUENCE              = 0x10
	TAG_SEQUENCE_OF           = 0x10
)

Variables

This section is empty.

Functions

func ReadApplicationTag

func ReadApplicationTag(tag uint8, r io.Reader) (int, error)

func ReadEnumerated

func ReadEnumerated(r io.Reader) (uint8, error)

func ReadInteger

func ReadInteger(r io.Reader) (int, error)

func ReadLength

func ReadLength(r io.Reader) (int, error)

func ReadUniversalTag

func ReadUniversalTag(tag uint8, pc bool, r io.Reader) bool

func WriteApplicationTag

func WriteApplicationTag(tag uint8, size int, w io.Writer)

func WriteBoolean

func WriteBoolean(b bool, w io.Writer)

func WriteEncodedDomainParams

func WriteEncodedDomainParams(data []byte, w io.Writer)

func WriteInteger

func WriteInteger(n int, w io.Writer)

func WriteLength

func WriteLength(size int, w io.Writer)

func WriteOctetstring

func WriteOctetstring(str string, w io.Writer)

func WriteUniversalTag

func WriteUniversalTag(tag uint8, pc bool, w io.Writer)

Types

This section is empty.

Jump to

Keyboard shortcuts

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