Function pospad

  • convert hexadecimal positive integer to ASN.1 integer value

    Parameters

    • h: string

      hexadecimal string of positive integer

    Returns string

    ASN.1 Integer DER encoded hexadecimal string

    Example

    pospad("01") -> "01"
    pospad("ab") -> "00ab"
    pospad("00000012") -> "12"
    pospad("000000ab") -> "00ab"