Bouncy Castle Cryptography 1.50

org.bouncycastle.asn1.cms
Class Attributes

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Object
      extended by org.bouncycastle.asn1.cms.Attributes
All Implemented Interfaces:
ASN1Encodable

public class Attributes
extends ASN1Object

RFC 5652 defines 5 "SET OF Attribute" entities with 5 different names. This is common implementation for them all:

   SignedAttributes      ::= SET SIZE (1..MAX) OF Attribute
   UnsignedAttributes    ::= SET SIZE (1..MAX) OF Attribute
   UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
   AuthAttributes        ::= SET SIZE (1..MAX) OF Attribute
   UnauthAttributes      ::= SET SIZE (1..MAX) OF Attribute

 Attributes ::=
   SET SIZE(1..MAX) OF Attribute
 


Constructor Summary
Attributes(ASN1EncodableVector v)
           
 
Method Summary
 Attribute[] getAttributes()
           
static Attributes getInstance(java.lang.Object obj)
          Return an Attribute set object from the given object.
 ASN1Primitive toASN1Primitive()
          Produce an object suitable for an ASN1OutputStream.
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attributes

public Attributes(ASN1EncodableVector v)
Method Detail

getInstance

public static Attributes getInstance(java.lang.Object obj)
Return an Attribute set object from the given object.

Accepted inputs:

Parameters:
obj - the object we want converted.
Throws:
java.lang.IllegalArgumentException - if the object cannot be converted.

getAttributes

public Attribute[] getAttributes()

toASN1Primitive

public ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.

Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object

Bouncy Castle Cryptography 1.50