go/src/encoding/asn1/marshal.go

var byte00Encoder

var byteFFEncoder

type encoder

type byteEncoder

func (c byteEncoder) Len() int {}

func (c byteEncoder) Encode(dst []byte) {}

type bytesEncoder

func (b bytesEncoder) Len() int {}

func (b bytesEncoder) Encode(dst []byte) {}

type stringEncoder

func (s stringEncoder) Len() int {}

func (s stringEncoder) Encode(dst []byte) {}

type multiEncoder

func (m multiEncoder) Len() int {}

func (m multiEncoder) Encode(dst []byte) {}

type setEncoder

func (s setEncoder) Len() int {}

func (s setEncoder) Encode(dst []byte) {}

type taggedEncoder

func (t *taggedEncoder) Len() int {}

func (t *taggedEncoder) Encode(dst []byte) {}

type int64Encoder

func (i int64Encoder) Len() int {}

func (i int64Encoder) Encode(dst []byte) {}

func base128IntLength(n int64) int {}

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

func makeBigInt(n *big.Int) (encoder, error) {}

func appendLength(dst []byte, i int) []byte {}

func lengthLength(i int) (numBytes int) {}

func appendTagAndLength(dst []byte, t tagAndLength) []byte {}

type bitStringEncoder

func (b bitStringEncoder) Len() int {}

func (b bitStringEncoder) Encode(dst []byte) {}

type oidEncoder

func (oid oidEncoder) Len() int {}

func (oid oidEncoder) Encode(dst []byte) {}

func makeObjectIdentifier(oid []int) (e encoder, err error) {}

func makePrintableString(s string) (e encoder, err error) {}

func makeIA5String(s string) (e encoder, err error) {}

func makeNumericString(s string) (e encoder, err error) {}

func makeUTF8String(s string) encoder {}

func appendTwoDigits(dst []byte, v int) []byte {}

func appendFourDigits(dst []byte, v int) []byte {}

func outsideUTCRange(t time.Time) bool {}

func makeUTCTime(t time.Time) (e encoder, err error) {}

func makeGeneralizedTime(t time.Time) (e encoder, err error) {}

func appendUTCTime(dst []byte, t time.Time) (ret []byte, err error) {}

func appendGeneralizedTime(dst []byte, t time.Time) (ret []byte, err error) {}

func appendTimeCommon(dst []byte, t time.Time) []byte {}

func stripTagAndLength(in []byte) []byte {}

func makeBody(value reflect.Value, params fieldParameters) (e encoder, err error) {}

func makeField(v reflect.Value, params fieldParameters) (e encoder, err error) {}

// Marshal returns the ASN.1 encoding of val.
//
// In addition to the struct tags recognized by Unmarshal, the following can be
// used:
//
//	ia5:         causes strings to be marshaled as ASN.1, IA5String values
//	omitempty:   causes empty slices to be skipped
//	printable:   causes strings to be marshaled as ASN.1, PrintableString values
//	utf8:        causes strings to be marshaled as ASN.1, UTF8String values
//	utc:         causes time.Time to be marshaled as ASN.1, UTCTime values
//	generalized: causes time.Time to be marshaled as ASN.1, GeneralizedTime values
func Marshal(val any) ([]byte, error) {}

// MarshalWithParams allows field parameters to be specified for the
// top-level element. The form of the params is the same as the field tags.
func MarshalWithParams(val any, params string) ([]byte, error) {}