Package io.anyline.nfc.bouncycastle.asn1
Class ASN1Object
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Encodable
,io.anyline.nfc.bouncycastle.util.Encodable
public abstract class ASN1Object implements ASN1Encodable, Encodable
Base class for defining an ASN.1 object.
-
-
Constructor Summary
Constructors Constructor Description ASN1Object()
-
Method Summary
Modifier and Type Method Description void
encodeTo(OutputStream output)
void
encodeTo(OutputStream output, String encoding)
Array<byte>
getEncoded()
Return the default BER or DER encoding for this object. Array<byte>
getEncoded(String encoding)
Return either the default for "BER" or a DER encoding if "DER" is specified. int
hashCode()
boolean
equals(Object o)
abstract ASN1Primitive
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding. -
-
Method Detail
-
encodeTo
void encodeTo(OutputStream output)
-
encodeTo
void encodeTo(OutputStream output, String encoding)
-
getEncoded
Array<byte> getEncoded()
Return the default BER or DER encoding for this object.
- Returns:
BER/DER byte encoded object.
-
getEncoded
Array<byte> getEncoded(String encoding)
Return either the default for "BER" or a DER encoding if "DER" is specified.
- Parameters:
encoding
- name of encoding to use.- Returns:
byte encoded object.
-
hashCode
int hashCode()
-
toASN1Primitive
abstract ASN1Primitive toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
- Returns:
a primitive representation of this object.
-
-
-
-