Package net.aifusion.asn
Class TaggedValue
java.lang.Object
net.aifusion.asn.AsnValue
net.aifusion.asn.TaggedValue
Class to manage a tagged value
- Author:
- Sharad Singhal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaggedValue
create
(byte[] buffer, int blen, int cursor) Create a tagged valuebyte[]
Get the encoded value for this ASN.1 value.getValue()
Get the underlying value associated with this tagged valuetoAsnString
(String prefix) Get a (semi) ASN.1 notation for this value.Methods inherited from class net.aifusion.asn.AsnValue
getLength, getTag, getTagClass, getTagEncoding, getTagNumber, toHex, toHex, toHex, toHex
-
Constructor Details
-
TaggedValue
-
-
Method Details
-
getEncodedValue
public byte[] getEncodedValue()Description copied from class:AsnValue
Get the encoded value for this ASN.1 value. This method should be implemented by subclasses to provide the encoded ASN.1 value- Specified by:
getEncodedValue
in classAsnValue
- Returns:
- byte [] containing encoded value for this ASN.1 value (including tag, length, content)
-
getValue
Get the underlying value associated with this tagged value- Returns:
- value of this tagged value
-
create
Create a tagged value- Parameters:
buffer
- - input buffer containing DER encoded valueblen
- - length of input buffercursor
- - current cursor in buffer- Returns:
- - tagged value
-
toAsnString
Description copied from class:AsnValue
Get a (semi) ASN.1 notation for this value.- Overrides:
toAsnString
in classAsnValue
- Parameters:
prefix
- - prefix to add to each line- Returns:
- - string containing the ASN.1 value
-