package asn1tools
Import Path
github.com/jcmturner/gokrb5/v8/asn1tools (on go.dev)
Dependency Relation
imports one package, and imported by 3 packages
Involved Source Files
Package asn1tools provides tools for managing ASN1 marshaled data.
Package-Level Functions (total 4)
AddASNAppTag adds an ASN1 encoding application tag value to the raw bytes provided.
GetLengthFromASN returns the length of a slice of ASN1 encoded bytes from the ASN1 length header it contains.
GetNumberBytesInLengthHeader returns the number of bytes in the ASn1 header that indicate the length.
MarshalLengthBytes returns the ASN1 encoded bytes for the length 'l'
There are two forms: short (for lengths between 0 and 127), and long definite (for lengths between 0 and 2^1008 -1).
Short form: One octet. Bit 8 has value "0" and bits 7-1 give the length.
Long form: Two to 127 octets. Bit 8 of first octet has value "1" and bits 7-1 give the number of additional length octets. Second and following octets give the length, base 256, most significant digit first.
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |