• get ASN.1 length(L) octets for specified string index

    Parameters

    • h: string

      supposed ASN.1 hexadecimal string

    • sidx: number

      string index of ASN.1 TLV to get

    Returns string

    hexadecimal string of ASN.1 octets

    Example

    @getLh("0203010203", 0) -> "03"
    @getLh("...040208ba", 3) -> "02" // TLV starts with 04020108...
    @getLh("0282034f03...", 0) -> "82034f"
    @getLh("02800203...", 0) -> "80" // ASN.1 BER infinite length