com.rsa.certj.cert.attributes

Class NonStandardAttribute

java.lang.Object
  |
  +--com.rsa.certj.cert.attributes.X501Attribute
        |
        +--com.rsa.certj.cert.attributes.NonStandardAttribute
All Implemented Interfaces:
Cloneable, Serializable

public class NonStandardAttribute
extends X501Attribute
implements Cloneable, Serializable

This class holds any attribute. It cannot encode or decode data. It can only take in the encoded value and return it.

Copyright © RSA Security Inc., 1999-2001. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.cert.attributes.X501Attribute
CHALLENGE_PASSWORD, CONTENT_TYPE, COUNTRY_OF_CITIZENSHIP, COUNTRY_OF_RESIDENCE, CRS_DUAL_STATUS, CRS_FAILURE_INFO, CRS_MESSAGE_TYPE, CRS_PKI_STATUS, CRS_RECIPIENT_NONCE, CRS_SENDER_NONCE, CRS_TRANSACTION_ID, CRS_VERSION, DATE_OF_BIRTH, FRIENDLY_NAME, GENDER, LOCAL_KEY_ID, MESSAGE_DIGEST, NON_STANDARD, PLACE_OF_BIRTH, POSTAL_ADDRESS, PSEUDONYM, SIGNING_TIME, SMART_CSP, X509_V3_EXTENSION
 

Constructor Summary

NonStandardAttribute()

Constructs an empty NonStandardAttribute object.

NonStandardAttribute(byte[] oid, int oidOffset, int oidLen, byte[] valueDER, int valueOffset, int valueLen)

Constructs a NonStandardAttribute object and initializes it with the OID and value given.

 

Method Summary

 Object

clone()

Overrides the default clone method to get a deeper clone.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same NonStandardAttribute, returns false otherwise.

 byte[]

getValue()

Gets the value of this attribute.

 void

setOID(byte[] oid, int oidOffset, int oidLen)

Sets the OID of this attribute.

 void

setValue(byte[] valueDER, int valueOffset, int valueLen)

Sets the value of this attribute.

 
Methods inherited from class com.rsa.certj.cert.attributes.X501Attribute
clearSensitiveData, compareOID, derEncodeAttributeLen, getAttributeType, getAttributeTypeString, getDEREncoding, getDERLen, getInstance, getNextBEROffset, getOID, isAttributeType
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonStandardAttribute

public NonStandardAttribute()
Constructs an empty NonStandardAttribute object.

NonStandardAttribute

public NonStandardAttribute(byte[] oid,
                            int oidOffset,
                            int oidLen,
                            byte[] valueDER,
                            int valueOffset,
                            int valueLen)
Constructs a NonStandardAttribute object and initializes it with the OID and value given.

Parameters

         oid  

A byte array that contains the OID.

         oidOffset  

The offset into the oid array.

         oidLen  

The length of the OID in the oid array.

         valueDER  

The DER encoding of the value. This value should not be wrapped in the SET. For more information, see the ASN1 class.

         valueOffset  

The offset into valueDER.

         valueLen  

The length of valueDER.

Method Detail

setOID

public void setOID(byte[] oid,
                   int oidOffset,
                   int oidLen)
Sets the OID of this attribute.

Parameters

         oid  

A byte array that contains the OID.

         oidOffset  

The offset into oid.

         oidLen  

The length of the OID in the oid array.


setValue

public void setValue(byte[] valueDER,
                     int valueOffset,
                     int valueLen)
Sets the value of this attribute.

Parameters

         valueDER  

The DER encoding of the value. This value should not be wrapped in the SET. For more information, see the ASN1 class.

         valueOffset  

The offset into valueDER.

         valueLen  

The length of valueDER.


getValue

public byte[] getValue()
Gets the value of this attribute. This method gets the DER encoding of the value.

Returns

A new byte array containing the DER encoding of the value.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides the default clone method to get a deeper clone.

Overrides

clone in class X501Attribute

Returns

A new NonStandardAttribute object, a copy of this object.

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same NonStandardAttribute, returns false otherwise.

Overrides

equals in class Object

Parameters

         obj  

The instance of the NonStandardAttribute object.

Returns

A boolean indicating whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000