hexadecimal string of ASN.1 length octet
ASN.1 length value. For ASN.1 BER indefinite length (i.e. "80"), returns -1
This function converts an ASN.1 TLV length octet to ASN.1 TLV length value. When the input is "80" which means ASN.1 BER indefinite length, it returns a special value -1.
lenhextoint("10") -> 16
lenhextoint("81ff") -> 256
lenhextoint("80") -> -1 // indefinite length
lenhextoint("82047b") -> 1147
convert ASN.1 TLV length octet to ASN.1 length value