Documentation ¶
Index ¶
- func CalculateWholeTLVLength(tagLength TagLength) int
- func ExpectLengthNotGreater(expectedLength *big.Int, length *big.Int) error
- func ExpectTag(expectedTag asn1crypto.Tag, tag asn1crypto.Tag) error
- func GetContextSpecificTagId(tagLength *TagLength) int
- func IsContextSpecificTag(tagLength *TagLength) bool
- func IsContextSpecificTagWithId(tagId int, tagLength *TagLength) bool
- func ParseIssuerRDNSequence(cert *x509.Certificate) (*pkix.RDNSequence, error)
- func ParseOctetString(reader Asn1Reader) (ret []byte, err error)
- func ParseRDNSequence(rdnData []byte) (*pkix.RDNSequence, error)
- func ParseSubjectRDNSequence(cert *x509.Certificate) (*pkix.RDNSequence, error)
- func ParseUTCTime(bytes []byte) (*time.Time, error)
- func PeekExpectedBigInt(reader Asn1Reader, sizeOfLength int, offset int) (*big.Int, error)
- func PeekExpectedBytes(reader Asn1Reader, byteSize int, offset int) ([]byte, error)
- func PeekTag(reader Asn1Reader, offset int) (*asn1crypto.Tag, error)
- func PeekUint8(reader Asn1Reader, offset int) (uint8, error)
- func ReadBigInt(reader Asn1Reader) (*big.Int, error)
- func ReadExpectedBigInt(reader Asn1Reader, sizeOfLength int) (*big.Int, error)
- func ReadExpectedBytes(reader Asn1Reader, byteSize int) ([]byte, error)
- func ReadExpectedBytesRecursive(reader Asn1Reader, byteSize int, byteArray *[]byte, currentPosition int) error
- func ReadStruct(reader Asn1Reader, value interface{}) error
- func ReadTVLBytesWithLimit(reader Asn1Reader, tagLength TagLength, maxLength int64) ([]byte, error)
- func ReadTag(reader Asn1Reader) (*asn1crypto.Tag, error)
- func ReadUint8(reader Asn1Reader) (uint8, error)
- func ReadUtcTime(reader Asn1Reader) (*time.Time, error)
- type Asn1Reader
- type BitString
- type Length
- type TagLength
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateWholeTLVLength ¶
func ExpectLengthNotGreater ¶
func ExpectTag ¶
func ExpectTag(expectedTag asn1crypto.Tag, tag asn1crypto.Tag) error
func GetContextSpecificTagId ¶
func IsContextSpecificTag ¶
func ParseIssuerRDNSequence ¶
func ParseIssuerRDNSequence(cert *x509.Certificate) (*pkix.RDNSequence, error)
func ParseOctetString ¶
func ParseOctetString(reader Asn1Reader) (ret []byte, err error)
func ParseRDNSequence ¶
func ParseRDNSequence(rdnData []byte) (*pkix.RDNSequence, error)
func ParseSubjectRDNSequence ¶
func ParseSubjectRDNSequence(cert *x509.Certificate) (*pkix.RDNSequence, error)
func PeekExpectedBigInt ¶
func PeekExpectedBytes ¶
func PeekExpectedBytes(reader Asn1Reader, byteSize int, offset int) ([]byte, error)
func PeekTag ¶
func PeekTag(reader Asn1Reader, offset int) (*asn1crypto.Tag, error)
func ReadBigInt ¶
func ReadBigInt(reader Asn1Reader) (*big.Int, error)
func ReadExpectedBigInt ¶
func ReadExpectedBigInt(reader Asn1Reader, sizeOfLength int) (*big.Int, error)
func ReadExpectedBytes ¶
func ReadExpectedBytes(reader Asn1Reader, byteSize int) ([]byte, error)
func ReadExpectedBytesRecursive ¶
func ReadExpectedBytesRecursive(reader Asn1Reader, byteSize int, byteArray *[]byte, currentPosition int) error
func ReadStruct ¶
func ReadStruct(reader Asn1Reader, value interface{}) error
func ReadTVLBytesWithLimit ¶
func ReadTVLBytesWithLimit(reader Asn1Reader, tagLength TagLength, maxLength int64) ([]byte, error)
func ReadTag ¶
func ReadTag(reader Asn1Reader) (*asn1crypto.Tag, error)
func ReadUint8 ¶
func ReadUint8(reader Asn1Reader) (uint8, error)
func ReadUtcTime ¶
func ReadUtcTime(reader Asn1Reader) (*time.Time, error)
Types ¶
type Asn1Reader ¶
type BitString ¶
func ParseBitString ¶
func ParseBitString(reader Asn1Reader) (*BitString, error)
type Length ¶
type Length struct { Length big.Int //number of bytes the value has LengthSize int //number of bytes the length has }
func PeekLength ¶
func PeekLength(reader Asn1Reader, offset int) (*Length, error)
func ReadLength ¶
func ReadLength(reader Asn1Reader) (*Length, error)
type TagLength ¶
type TagLength struct { Tag asn1crypto.Tag Length Length }
func PeekTagLength ¶
func PeekTagLength(reader Asn1Reader, offset int) (*TagLength, error)
func ReadTagLength ¶
func ReadTagLength(reader Asn1Reader) (*TagLength, error)
func (TagLength) CalculateTLLength ¶
Complete length in byte of length of the value
func (TagLength) CalculateTLVLength ¶
Complete length in byte of the tlv record
func (TagLength) CalculateValueLength ¶
Complete length in byte of value
Click to show internal directories.
Click to hide internal directories.