Class DerTlv

java.lang.Object
de.tsenger.vdstools.DerTlv

public class DerTlv extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    DerTlv(byte tag, byte[] value)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static DerTlv
    fromByteArray(byte[] rawBytes)
     
    byte[]
    wraps the given data (Value) in a DER TLV object with free choice of the tag Length will be calculated as defined in ASN.1 DER length encoding
    byte
     
    byte[]
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DerTlv

      public DerTlv(byte tag, byte[] value)
  • Method Details

    • getEncoded

      public byte[] getEncoded() throws IOException
      wraps the given data (Value) in a DER TLV object with free choice of the tag Length will be calculated as defined in ASN.1 DER length encoding
      Returns:
      value with added tag and length
      Throws:
      IOException - on encoding error.
    • fromByteArray

      public static DerTlv fromByteArray(byte[] rawBytes) throws IOException
      Throws:
      IOException
    • getTag

      public byte getTag()
    • getValue

      public byte[] getValue()