Class Attribute
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Encodable
,io.anyline.nfc.bouncycastle.util.Encodable
public class Attribute extends ASN1Object
RFC 5652: Attribute is a pair of OID (as type identifier) + set of values.
Attribute ::= SEQUENCE { attrType OBJECT IDENTIFIER, attrValues SET OF AttributeValue } AttributeValue ::= ANY
General rule on values is that same AttributeValue must not be included multiple times into the set. That is, if the value is a SET OF INTEGERs, then having same value repeated is wrong: (1, 1), but different values is OK: (1, 2). Normally the AttributeValue syntaxes are more complicated than that.
General rule of Attribute usage is that the Attributes containers must not have multiple Attribute:s with same attrType (OID) there.
-
-
Field Summary
Fields Modifier and Type Field Description public ASN1ObjectIdentifier
attrType
public ASN1Set
attrValues
-
Constructor Summary
Constructors Constructor Description Attribute(ASN1ObjectIdentifier attrType, ASN1Set attrValues)
-
Method Summary
Modifier and Type Method Description ASN1ObjectIdentifier
getAttrType()
ASN1Set
getAttrValues()
static Attribute
getInstance(Object o)
Return an Attribute object from the given object. Array<ASN1Encodable>
getAttributeValues()
ASN1Primitive
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream. -
-
Constructor Detail
-
Attribute
Attribute(ASN1ObjectIdentifier attrType, ASN1Set attrValues)
-
-
Method Detail
-
getAttrType
ASN1ObjectIdentifier getAttrType()
-
getAttrValues
ASN1Set getAttrValues()
-
getInstance
static Attribute getInstance(Object o)
Return an Attribute object from the given object.
Accepted inputs:
- null → null
- Attribute object
- ASN1Sequence input formats with Attribute structure inside
- Parameters:
o
- the object we want converted.
-
getAttributeValues
Array<ASN1Encodable> getAttributeValues()
-
toASN1Primitive
ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
-
-
-
-