SET and SET OF constructs.Note
This does not know which syntax the set is! (The difference: ordering of SET elements or not ordering.)
DER form is always definite form length fields, while BER support uses indefinite form.
The CER form support does not exist.
8.11.2 The contents octets shall consist of the complete encoding of a data value from each of the types listed in the ASN.1 definition of the set type, in an order chosen by the sender, unless the type was referenced with the keyword OPTIONAL or the keyword DEFAULT.
8.11.3 The encoding of a data value may, but need not, be present for a type which was referenced with the keyword OPTIONAL or the keyword DEFAULT.
NOTE — The order of data values in a set value is not significant, and places no constraints on the order during transfer
8.12.1 The encoding of a set-of value shall be constructed.
8.12.2 The text of 8.10.2 applies: The contents octets shall consist of zero, one or more complete encodings of data values from the type listed in the ASN.1 definition.
8.12.3 The order of data values need not be preserved by the encoding and subsequent decoding.
NOTE — Where a component of the set is an untagged choice type, the location of that component in the ordering will depend on the tag of the choice component being encoded.
The encodings of the component values of a set-of value shall appear in ascending order, the encodings being compared as octet strings with the shorter components being padded at their trailing end with 0-octets.
NOTE — The padding octets are for comparison purposes only and do not appear in the encodings.
| Modifier and Type | Field and Description |
|---|---|
| protected final ASN1Encodable[] | |
| protected ASN1Encodable[] | |
| pack-priv static final ASN1UniversalType |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | |
| protected | ASN1Set(ASN1EncodableVector
a vector of objects to make up the SET. elementVector, boolean true if should be sorted DER style, false otherwise. doSort)Create a SET containing a vector of objects. |
| protected | ASN1Set(ASN1Encodable[]
an array of objects to make up the SET. elements, boolean true if should be sorted DER style, false otherwise. doSort)Create a SET containing an array of objects. |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | asn1Equals(ASN1Primitive other)
Implements abstract org. Equality (similarity) comparison for two ASN1Primitive objects. |
| pack-priv boolean | encodeConstructed()
Implements abstract org. Return true if this objected is a CONSTRUCTED one, false otherwise. |
| private static byte[] | |
| public static ASN1Set | Returns: an ASN1Set instance, or null.the object we want converted. obj)return an ASN1Set from the given object. |
| public static ASN1Set | Returns: an ASN1Set instance.the tagged object. taggedObject, boolean true if the object is meant to be explicitly tagged
false otherwise. explicit)Return an ASN1 set from a tagged object. |
| public ASN1Encodable | Returns: the object at the set position indicated by index.the set number (starting at zero) of the object index)return the object at the set position indicated by index. |
| public Enumeration | |
| public int | hashCode()
Implements abstract org. Returns a hash code value for this object. |
| public Iterator | iterator()
Implements org. Returns an iterator over a set of elements of type T. |
| private static boolean | |
| public ASN1SetParser | |
| public int | |
| private static void | |
| public ASN1Encodable[] | |
| pack-priv ASN1Primitive | toDERObject()
Overrides org. Change current SET object to be encoded as |
| pack-priv ASN1Primitive | toDLObject()
Overrides org. Change current SET object to be encoded as |
| public String |
| elements | back to summary |
|---|---|
| protected final ASN1Encodable[] elements | |
| sortedElements | back to summary |
|---|---|
| protected ASN1Encodable[] sortedElements | |
| TYPE | back to summary |
|---|---|
| pack-priv static final ASN1UniversalType TYPE | |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set() | |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1Encodable element) Create a SET containing one object
| |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1EncodableVector elementVector, boolean doSort) Create a SET containing a vector of objects.
| |
| ASN1Set | back to summary |
|---|---|
| protected ASN1Set(ASN1Encodable[] elements, boolean doSort) Create a SET containing an array of objects.
| |
| ASN1Set | back to summary |
|---|---|
| pack-priv ASN1Set(boolean isSorted, ASN1Encodable[] elements) | |
| ASN1Set | back to summary |
|---|---|
| pack-priv ASN1Set(ASN1Encodable[] elements, ASN1Encodable[] sortedElements) | |
| asn1Equals | back to summary |
|---|---|
| pack-priv boolean asn1Equals(ASN1Primitive other) Implements abstract org. Doc from org. Equality (similarity) comparison for two ASN1Primitive objects. | |
| encodeConstructed | back to summary |
|---|---|
| pack-priv boolean encodeConstructed() Implements abstract org. Doc from org. Return true if this objected is a CONSTRUCTED one, false otherwise.
| |
| getDEREncoded | back to summary |
|---|---|
| private static byte[] getDEREncoded(ASN1Encodable obj) | |
| getInstance | back to summary |
|---|---|
| public static ASN1Set getInstance(Object obj) return an ASN1Set from the given object.
| |
| getInstance | back to summary |
|---|---|
| public static ASN1Set getInstance(ASN1TaggedObject taggedObject, boolean explicit) Return an ASN1 set from a tagged object. There is a special case here, if an object appears to have been explicitly tagged on reading but we were expecting it to be implicitly tagged in the normal course of events it indicates that we lost the surrounding set - so we need to add it back (this will happen if the tagged object is a sequence that contains other sequences). If you are dealing with implicitly tagged sets you really should be using this method.
| |
| getObjectAt | back to summary |
|---|---|
| public ASN1Encodable getObjectAt(int index) return the object at the set position indicated by index.
| |
| getObjects | back to summary |
|---|---|
| public Enumeration | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract org. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements org. Doc from org. Returns an iterator over a set of elements of type T.
| |
| lessThanOrEqual | back to summary |
|---|---|
| private static boolean lessThanOrEqual(byte[] a, byte[] b) return true if a <= b (arrays are assumed padded with zeros). | |
| parser | back to summary |
|---|---|
| public ASN1SetParser parser() | |
| size | back to summary |
|---|---|
| public int size() return the number of objects in this set.
| |
| sort | back to summary |
|---|---|
| private static void sort(ASN1Encodable[] t) | |
| toArray | back to summary |
|---|---|
| public ASN1Encodable[] toArray() | |
| toDERObject | back to summary |
|---|---|
| pack-priv ASN1Primitive toDERObject() Overrides org. Change current SET object to be encoded as
| |
| toDLObject | back to summary |
|---|---|
| pack-priv ASN1Primitive toDLObject() Overrides org. Change current SET object to be encoded as
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |