Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.45
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1
Class ASN1Encodable

    java.lang.Object
      org.bouncycastle.asn1.ASN1Encodable

All Implemented Interfaces:
  DEREncodable

Direct Known Subclasses:
  AccessDescription, Accuracy, AdditionalInformationSyntax, Admissions, AdmissionSyntax, AlgorithmIdentifier, AttCertIssuer, AttCertValidityPeriod, Attribute, Attribute, Attribute, AttributeCertificate, AttributeCertificateInfo, AttributeTypeAndValue, AuthenticatedData, AuthenticatedSafe, AuthEnvelopedData, AuthorityInformationAccess, AuthorityKeyIdentifier, BasicConstraints, BasicOCSPResponse, BiometricData, CAKeyUpdAnnContent, CAST5CBCParameters, CertBag, CertConfirmContent, CertHash, CertId, CertID, CertificateList, CertificatePair, CertificatePolicies, CertificationRequest, CertificationRequestInfo, CertifiedKeyPair, CertOrEncCert, CertRepMessage, CertReqMessages, CertReqMsg, CertRequest, CertResponse, CertStatus, CertStatus, CertTemplate, Challenge, CMPCertificate, CommitmentTypeIndication, CommitmentTypeQualifier, CompressedData, ContentHints, ContentIdentifier, ContentInfo, ContentInfo, Controls, CRLAnnContent, CRLDistPoint, CrlID, DataGroupHash, DeclarationOfMajority, DERObject, DHParameter, DigestInfo, DirectoryString, DisplayText, DistributionPoint, DistributionPointName, DSAParameter, ECGOST3410ParamSetParameters, ECPrivateKeyStructure, ElGamalParameter, EncryptedContentInfo, EncryptedData, EncryptedData, EncryptedPrivateKeyInfo, EncryptedValue, EnvelopedData, ErrorMsgContent, ESSCertID, ESSCertIDv2, ExtendedKeyUsage, GeneralName, GeneralNames, GeneralSubtree, GenMsgContent, GenRepContent, GOST28147Parameters, GOST3410ParamSetParameters, GOST3410PublicKeyAlgParameters, Holder, IDEACBCPar, IetfAttrSyntax, InfoTypeAndValue, Iso4217CurrencyCode, IssuerAndSerialNumber, IssuerAndSerialNumber, IssuerSerial, IssuingDistributionPoint, KEKIdentifier, KEKRecipientInfo, KeyAgreeRecipientIdentifier, KeyAgreeRecipientInfo, KeyRecRepContent, KeySpecificInfo, KeyTransRecipientInfo, LDSSecurityObject, MacData, MessageImprint, MonetaryLimit, MonetaryValue, MQVuserKeyingMaterial, NameConstraints, NameOrPseudonym, NamingAuthority, NetscapeCertRequest, NoticeReference, ObjectDigestInfo, OCSPRequest, OCSPResponse, OOBCertHash, OptionalValidity, OriginatorIdentifierOrKey, OriginatorInfo, OriginatorPublicKey, OtherCertID, OtherHashAlgAndValue, OtherInfo, OtherKeyAttribute, OtherRecipientInfo, OtherSigningCertificate, PasswordRecipientInfo, PBES2Parameters, PBKDF2Params, PBMParameter, PersonalData, Pfx, PKCS12PBEParams, PKIBody, PKIConfirmContent, PKIFreeText, PKIHeader, PKIMessage, PKIMessages, PKIPublicationInfo, PKIStatus, PKIStatusInfo, PolicyInformation, PolicyMappings, PolicyQualifierInfo, PollRepContent, PollReqContent, POPODecKeyChallContent, POPODecKeyRespContent, POPOPrivKey, POPOSigningKey, POPOSigningKeyInput, PrivateKeyInfo, PrivateKeyUsagePeriod, ProcurationSyntax, ProfessionInfo, ProofOfPossession, ProtectedPart, PublicKeyAndChallenge, QCStatement, RC2CBCParameter, RecipientEncryptedKey, RecipientIdentifier, RecipientInfo, RecipientKeyIdentifier, Request, RequestedCertificate, ResponderID, ResponseBytes, ResponseData, Restriction, RevAnnContent, RevDetails, RevokedInfo, RevRepContent, RevReqContent, RoleSyntax, RSAESOAEPparams, RSAPrivateKeyStructure, RSAPublicKeyStructure, RSASSAPSSparams, SafeBag, SemanticsInformation, ServiceLocator, Signature, SignaturePolicyId, SignaturePolicyIdentifier, SignedData, SignedData, SignedPublicKeyAndChallenge, SignerAttribute, SignerIdentifier, SignerInfo, SignerInfo, SignerLocation, SigningCertificate, SigningCertificateV2, SigPolicyQualifierInfo, SigPolicyQualifiers, SinglePubInfo, SingleResponse, SMIMECapabilities, SMIMECapability, SubjectDirectoryAttributes, SubjectKeyIdentifier, SubjectPublicKeyInfo, Target, TargetInformation, Targets, TBSCertificateStructure, TBSCertList, TBSCertList.CRLEntry, TBSRequest, Time, Time, TimeStampReq, TimeStampResp, TSTInfo, TypeOfBiometricData, UserNotice, V2Form, X509Attribute, X509CertificateStructure, X509Extensions, X509KeyUsage, X509Name, X962Parameters, X9Curve, X9ECParameters, X9ECPoint, X9FieldElement, X9FieldID

    public abstract class ASN1Encodable

extends java.lang.Object
implements DEREncodable

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

Field Summary
`static java.lang.String` | `BER`
`static java.lang.String` | `DER`

Constructor Summary
`ASN1Encodable()`

Method Summary
`boolean` | `equals(java.lang.Object o)`
`byte[]` | `getDEREncoded()` Return the DER encoding of the object, null if the DER encoding can not be made.
`DERObject` | `getDERObject()`
`byte[]` | `getEncoded()` Return the default BER or DER encoding for this object.
`byte[]` | `getEncoded(java.lang.String encoding)` Return either the default for "BER" or a DER encoding if "DER" is specified.
`int` | `hashCode()`
`abstract DERObject` | `toASN1Object()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DER

    public static final java.lang.String DER

See Also:
  Constant Field Values

### BER

    public static final java.lang.String BER

See Also:
  Constant Field Values

Constructor Detail

### ASN1Encodable

    public ASN1Encodable()

Method Detail

### getEncoded

    public byte[] getEncoded()
                      throws java.io.IOException

  Return the default BER or DER encoding for this object.

  Returns:
    BER/DER byte encoded object.
  Throws:
    `java.io.IOException` - on encoding error.

### getEncoded

    public byte[] getEncoded(java.lang.String encoding)
                      throws java.io.IOException

  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:
    `java.io.IOException` - on encoding error.

### getDEREncoded

    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.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### getDERObject

    public DERObject getDERObject()

  Specified by:
    `getDERObject` in interface `DEREncodable`

### toASN1Object

    public abstract DERObject toASN1Object()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.45
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD