Package org.bouncycastle.asn1
Class DERExternal
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1Primitive
org.bouncycastle.asn1.DERExternal
- All Implemented Interfaces:
ASN1Encodable
public class DERExternal extends ASN1Primitive
Class representing the DER-type External
-
Constructor Summary
Constructors Constructor Description DERExternal(ASN1EncodableVector vector)DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, int encoding, ASN1Primitive externalData)Creates a new instance of DERExternal.DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, DERTaggedObject externalData)Creates a new instance of DERExternal See X.690 for more informations about the meaning of these parameters -
Method Summary
Modifier and Type Method Description ASN1PrimitivegetDataValueDescriptor()Returns the data value descriptorASN1ObjectIdentifiergetDirectReference()Returns the direct reference of the external elementintgetEncoding()Returns the encoding of the content.ASN1PrimitivegetExternalContent()Returns the content of this elementASN1IntegergetIndirectReference()Returns the indirect reference of this elementinthashCode()Returns an integer hash code for this object.Methods inherited from class org.bouncycastle.asn1.ASN1Primitive
equals, fromByteArray, toASN1PrimitiveMethods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
-
Constructor Details
-
DERExternal
-
DERExternal
public DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, DERTaggedObject externalData)Creates a new instance of DERExternal See X.690 for more informations about the meaning of these parameters- Parameters:
directReference- The direct reference ornullif not set.indirectReference- The indirect reference ornullif not set.dataValueDescriptor- The data value descriptor ornullif not set.externalData- The external data in its encoded form.
-
DERExternal
public DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, int encoding, ASN1Primitive externalData)Creates a new instance of DERExternal. See X.690 for more informations about the meaning of these parameters- Parameters:
directReference- The direct reference ornullif not set.indirectReference- The indirect reference ornullif not set.dataValueDescriptor- The data value descriptor ornullif not set.encoding- The encoding to be used for the external dataexternalData- The external data
-
-
Method Details
-
hashCode
public int hashCode()Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Specified by:
hashCodein classASN1Primitive- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-
getDataValueDescriptor
Returns the data value descriptor- Returns:
- The descriptor
-
getDirectReference
Returns the direct reference of the external element- Returns:
- The reference
-
getEncoding
public int getEncoding()Returns the encoding of the content. Valid values are0single-ASN1-type1OCTET STRING2BIT STRING
- Returns:
- The encoding
-
getExternalContent
Returns the content of this element- Returns:
- The content
-
getIndirectReference
Returns the indirect reference of this element- Returns:
- The reference
-