Function getLength

  • get ASN.1 TLV length octet(s) by TLV value octet length

    Parameters

    • n: number

      TLV value octet length

    Returns string

    hexadecimal string of TLV length octets

    Example

    getLength(3) -> "03"
    getLength(128) -> "8180"