ber

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BER_CLASS_MASK = 0xC0
	BER_CLASS_UNIV = 0x00 /* 0 0 */
	BER_CLASS_APPL = 0x40 /* 0 1 */
	BER_CLASS_CTXT = 0x80 /* 1 0 */
	BER_CLASS_PRIV = 0xC0 /* 1 1 */
)

Class - bits 8 and 7

View Source
const (
	BER_PC_MASK   = 0x20
	BER_PRIMITIVE = 0x00 /* 0 */
	BER_CONSTRUCT = 0x20 /* 1 */
)

P/C - bit 6

View Source
const (
	BER_TAG_MASK            = 0x1F
	BER_TAG_BOOLEAN         = 0x01
	BER_TAG_INTEGER         = 0x02
	BER_TAG_BIT_STRING      = 0x03
	BER_TAG_OCTET_STRING    = 0x04
	BER_TAG_OBJECT_IDENFIER = 0x06
	BER_TAG_ENUMERATED      = 0x0A
	BER_TAG_SEQUENCE        = 0x10
	BER_TAG_SEQUENCE_OF     = 0x10
)

Variables

This section is empty.

Functions

func BER_PC

func BER_PC(pc bool) uint8

func ReadApplicationTag

func ReadApplicationTag(r io.Reader, tag uint8) []byte

func ReadDomainParameters

func ReadDomainParameters(r io.Reader) []byte

func ReadEnumerated

func ReadEnumerated(r io.Reader) uint8

func ReadInteger

func ReadInteger(r io.Reader) int

func ReadInteger16

func ReadInteger16(r io.Reader) (bb uint16)

func ReadInteger32

func ReadInteger32(r io.Reader) (bb uint32)

func ReadInteger8

func ReadInteger8(r io.Reader) (bb uint8)

func ReadLength

func ReadLength(r io.Reader) int

func ReadUniversalTag

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

func WriteApplicationTag

func WriteApplicationTag(w io.Writer, tag uint8, data []byte)

func WriteBoolean

func WriteBoolean(w io.Writer, ok bool)

func WriteDomainParameters

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

func WriteInteger

func WriteInteger(w io.Writer, n int)

func WriteLength

func WriteLength(w io.Writer, length int)

func WriteOctetstring

func WriteOctetstring(w io.Writer, str string)

func WriteUniversalTag

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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