Package org.bouncycastle.asn1
Class ASN1External
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1Primitive
org.bouncycastle.asn1.ASN1External
- All Implemented Interfaces:
ASN1Encodable
,Encodable
- Direct Known Subclasses:
DERExternal
,DLExternal
Class representing the DER-type External
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ASN1Primitive
protected ASN1ObjectIdentifier
protected int
protected int
protected ASN1Primitive
protected ASN1Integer
-
Constructor Summary
ConstructorsConstructorDescriptionASN1External
(ASN1EncodableVector vector) Construct an EXTERNAL object, the input encoding vector must have exactly two elements on it.ASN1External
(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, int encoding, ASN1Primitive externalData) Creates a new instance of External.ASN1External
(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, DERTaggedObject externalData) Creates a new instance of External See X.690 for more informations about the meaning of these parameters -
Method Summary
Modifier and TypeMethodDescriptionReturns the data value descriptorReturns the direct reference of the external elementint
Returns the encoding of the content.Returns the content of this elementReturns the indirect reference of this elementint
hashCode()
Methods inherited from class org.bouncycastle.asn1.ASN1Primitive
encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1Primitive
Methods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue
-
Field Details
-
directReference
-
indirectReference
-
dataValueDescriptor
-
encoding
protected int encoding -
externalContent
-
encodedLen
protected int encodedLen
-
-
Constructor Details
-
ASN1External
Construct an EXTERNAL object, the input encoding vector must have exactly two elements on it.Acceptable input formats are:
-
ASN1ObjectIdentifier
+ dataDERTaggedObject
(direct reference form) -
ASN1Integer
+ dataDERTaggedObject
(indirect reference form) - Anything but
DERTaggedObject
+ dataDERTaggedObject
(data value form)
- Throws:
IllegalArgumentException
- if input size is wrong, or
-
-
ASN1External
public ASN1External(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, DERTaggedObject externalData) Creates a new instance of External See X.690 for more informations about the meaning of these parameters- Parameters:
directReference
- The direct reference ornull
if not set.indirectReference
- The indirect reference ornull
if not set.dataValueDescriptor
- The data value descriptor ornull
if not set.externalData
- The external data in its encoded form.
-
ASN1External
public ASN1External(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, int encoding, ASN1Primitive externalData) Creates a new instance of External. See X.690 for more informations about the meaning of these parameters- Parameters:
directReference
- The direct reference ornull
if not set.indirectReference
- The indirect reference ornull
if not set.dataValueDescriptor
- The data value descriptor ornull
if not set.encoding
- The encoding to be used for the external dataexternalData
- The external data
-
-
Method Details
-
hashCode
public int hashCode()- Specified by:
hashCode
in classASN1Primitive
-
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 are0
single-ASN1-type1
OCTET STRING2
BIT 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
-