internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package internal contains common routines between der2ascii and ascii2der.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class byte
const (
	ClassUniversal       Class = 0x0
	ClassApplication     Class = 0x40
	ClassContextSpecific Class = 0x80
	ClassPrivate         Class = 0xc0
)

type Tag

type Tag struct {
	Class       Class
	Number      uint32
	Constructed bool
	// LongFormOverride, if non-zero, is how many bytes this tag is encoded
	// with in long form, excluding the initial byte.
	LongFormOverride int
}

func TagByName

func TagByName(name string) (Tag, bool)

TagByName returns the universal tag by name or false if no tag matches.

func (Tag) GetAlias

func (t Tag) GetAlias() (name string, toggleConstructed bool, ok bool)

GetAlias looks up the alias for the given tag. If one exists, it returns the name and sets toggleConstructed if the tag's constructed bit does not match the alias's default. Otherwise it sets ok to false.

Jump to

Keyboard shortcuts

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