Class ASN1Integer

java.lang.Object
de.christofreichardt.asn1.ASN1
de.christofreichardt.asn1.ASN1Integer
All Implemented Interfaces:
de.christofreichardt.diagnosis.Traceable

public final class ASN1Integer extends ASN1
ASN.1 helper class representing an arbitrary INTEGER
Author:
Christof Reichardt
  • Constructor Details

    • ASN1Integer

      public ASN1Integer(byte[] bytes)
      Creates an ASN.1 INTEGER.
      Parameters:
      bytes - the DER encoded bytes representing an ASN.1 INTEGER.
    • ASN1Integer

      public ASN1Integer(byte[] bytes, int from)
      Creates an ASN.1 INTEGER.
      Parameters:
      bytes - the DER encoded bytes representing an ASN.1 INTEGER.
      from - starting position in the given byte array.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • encode

      public static ASN1Integer encode(byte[] bytes)
      Creates an ASN.1 INTEGER by augmenting the given content octets with identifier and length octets.
      Parameters:
      bytes - the content octets that is the actual value.
      Returns:
      a proper ASN.1 INTEGER.