public class Attribute
extends org.bouncycastle.asn1.ASN1Object
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.
Constructor and Description |
---|
Attribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType,
org.bouncycastle.asn1.ASN1Set attrValues) |
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.asn1.ASN1Encodable[] |
getAttributeValues() |
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getAttrType() |
org.bouncycastle.asn1.ASN1Set |
getAttrValues() |
static Attribute |
getInstance(java.lang.Object o)
Return an Attribute object from the given object.
|
org.bouncycastle.asn1.ASN1Primitive |
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
|
public Attribute(org.bouncycastle.asn1.ASN1ObjectIdentifier attrType, org.bouncycastle.asn1.ASN1Set attrValues)
public static Attribute getInstance(java.lang.Object o)
Accepted inputs:
Attribute
object
ASN1Sequence
input formats with Attribute structure inside
o
- the object we want converted.java.lang.IllegalArgumentException
- if the object cannot be converted.public org.bouncycastle.asn1.ASN1ObjectIdentifier getAttrType()
public org.bouncycastle.asn1.ASN1Set getAttrValues()
public org.bouncycastle.asn1.ASN1Encodable[] getAttributeValues()
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
toASN1Primitive
in interface org.bouncycastle.asn1.ASN1Encodable
toASN1Primitive
in class org.bouncycastle.asn1.ASN1Object