Skip to content

Commit

Permalink
fix: update comment
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Aug 3, 2023
1 parent f4dc95f commit 3c99402
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/encoding/asn1/asn1.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ func decode(r []byte) (value, error) {
return rootConstructed, nil
}

// decodeMetadata decodes the metadata of a BER-encoded ASN.1 value.
//
// r is the input byte slice.
// The first return value is the identifier octets.
// The second return value is the content length.
// The third return value is the BER value length.
// The fourth return value is the subsequent value after the identifier and
// length octets.
func decodeMetadata(r []byte) ([]byte, int, int, []byte, error) {
length := len(r)
identifier, r, err := decodeIdentifier(r)
Expand Down

0 comments on commit 3c99402

Please sign in to comment.