Top Description Fields Constructors Methods
org.bouncycastle.asn1.cms

public Class Attributes

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Object, .ASN1Primitive, .ASN1Set, .ASN1TaggedObject, .DLSet

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

Field Summary

Modifier and TypeField and Description
private ASN1Set

Constructor Summary

AccessConstructor and Description
private
public

Method Summary

Modifier and TypeMethod and Description
public Attribute[]
public static Attributes
getInstance(Object
the object we want converted.
obj
)

Return an Attribute set object from the given object.

public static Attributes
getInstance(ASN1TaggedObject obj, boolean explicit)

public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

attributesback to summary
private ASN1Set attributes

Constructor Detail

Attributesback to summary
private Attributes(ASN1Set set)
Attributesback to summary
public Attributes(ASN1EncodableVector v)

Method Detail

getAttributesback to summary
public Attribute[] getAttributes()
getInstanceback to summary
public static Attributes getInstance(Object obj)

Return an Attribute set object from the given object.

Accepted inputs:

  • null → null
  • Attributes object
  • ASN1Set input formats with Attributes structure inside
Parameters
obj:Object

the object we want converted.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getInstanceback to summary
public static Attributes getInstance(ASN1TaggedObject obj, boolean explicit)
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.