public abstract class

ASN1Encodable

extends Object
implements DEREncodable
java.lang.Object
   ↳ org.bouncycastle.asn1.ASN1Encodable
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Base class for objects which can be written directly to ASN.1 output streams.

Summary

Constants
String BER
String DER
Public Constructors
ASN1Encodable()
Public Methods
boolean equals(Object o)
byte[] getDEREncoded()
Return the DER encoding of the object, null if the DER encoding can not be made.
DERObject getDERObject()
byte[] getEncoded(String encoding)
Return either the default for "BER" or a DER encoding if "DER" is specified.
byte[] getEncoded()
Return the default BER or DER encoding for this object.
int hashCode()
abstract DERObject toASN1Object()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.bouncycastle.asn1.DEREncodable

Constants

public static final String BER

Constant Value: "BER"

public static final String DER

Constant Value: "DER"

Public Constructors

public ASN1Encodable ()

Public Methods

public boolean equals (Object o)

public byte[] getDEREncoded ()

Return the DER encoding of the object, null if the DER encoding can not be made.

Returns
  • a DER byte array, null otherwise.

public DERObject getDERObject ()

public 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.
Throws
IOException on encoding error.

public byte[] getEncoded ()

Return the default BER or DER encoding for this object.

Returns
  • BER/DER byte encoded object.
Throws
IOException on encoding error.

public int hashCode ()

public abstract DERObject toASN1Object ()