Package de.tsenger.vdstools
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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DerTlvfromByteArray(byte[] rawBytes)byte[]getEncoded()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 encodingbytegetTag()byte[]getValue()
-
-
-
Method Detail
-
getEncoded
public byte[] getEncoded() throws IOExceptionwraps 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()
-
-