public class Asn1Object extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
length |
protected int |
tag |
protected int |
type |
protected byte[] |
value |
| Constructor and Description |
|---|
Asn1Object(int tag,
int length,
byte[] value)
Construct a ASN.1 TLV.
|
| Modifier and Type | Method and Description |
|---|---|
BigInteger |
getInteger()
Get the value as integer
|
int |
getLength() |
DerParser |
getParser()
For constructed field, return a parser for its content.
|
String |
getString()
Get value as string.
|
int |
getType() |
byte[] |
getValue() |
boolean |
isConstructed() |
protected final int type
protected final int length
protected final byte[] value
protected final int tag
public Asn1Object(int tag,
int length,
byte[] value)
The first byte in DER encoding is made of following fields,
------------------------------------------------- |Bit 8|Bit 7|Bit 6|Bit 5|Bit 4|Bit 3|Bit 2|Bit 1| ------------------------------------------------- | Class | CF | + Type | -------------------------------------------------
tag - Tag or Identifierlength - Length of the fieldvalue - Encoded octet string for the field.public int getType()
public int getLength()
public byte[] getValue()
public boolean isConstructed()
public DerParser getParser() throws IOException
IOExceptionpublic BigInteger getInteger() throws IOException
IOExceptionpublic String getString() throws IOException
IOExceptionCopyright © 2023. All rights reserved.