Bouncy Castle Cryptography Library 1.45

## org.bouncycastle.asn1.cms
Class Attribute

    java.lang.Object
      org.bouncycastle.asn1.ASN1Encodable
          org.bouncycastle.asn1.cms.Attribute

All Implemented Interfaces:
  DEREncodable

Direct Known Subclasses:
  SMIMECapabilitiesAttribute, SMIMEEncryptionKeyPreferenceAttribute

    public class Attribute

extends ASN1Encodable

Field Summary

Fields inherited from class org.bouncycastle.asn1.ASN1Encodable
`BER, DER`

Constructor Summary
`Attribute(ASN1Sequence seq)`
`Attribute(DERObjectIdentifier attrType, ASN1Set attrValues)`

Method Summary
`DERObjectIdentifier` `getAttrType()`
`ASN1Set` `getAttrValues()`
`static Attribute` `getInstance(java.lang.Object o)` return an Attribute object from the given object.
`DERObject` `toASN1Object()` Produce an object suitable for an ASN1OutputStream.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable
`equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Attribute

    public Attribute(ASN1Sequence seq)

### Attribute

    public Attribute(DERObjectIdentifier attrType,
                     ASN1Set attrValues)

Method Detail

### getInstance

    public static Attribute getInstance(java.lang.Object o)

  return an Attribute object from the given object.

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

### getAttrType

    public DERObjectIdentifier getAttrType()

### getAttrValues

    public ASN1Set getAttrValues()

### toASN1Object

    public DERObject toASN1Object()

  Produce an object suitable for an ASN1OutputStream.

       Attribute ::= SEQUENCE {
           attrType OBJECT IDENTIFIER,
           attrValues SET OF AttributeValue
       }

  Specified by:
    `toASN1Object` in class `ASN1Encodable`

Bouncy Castle Cryptography Library 1.45