com.rsa.certj.cert.attributes

Class ChallengePassword

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

public class ChallengePassword
extends X501Attribute
implements Cloneable, Serializable

This class holds, encodes, and decodes the ChallengePassword attribute. This attribute is defined in PKCS #9. It specifies a password by which an entity may request certificate revocation. The interpretation of the password is intended to be specified by the issuer of the certificate; no particular interpretation is required. The ChallengePassword attribute type is intended for PKCS #10 certificate requests.

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

ChallengePassword()

Constructs an empty ChallengePassword object.

ChallengePassword(char[] password, int offset, int len, int stringType)

Constructs a ChallengePassword object and initializes it with the values 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 ChallengePassword, returns false otherwise.

 char[]

getChallengePassword()

Gets the value of this attribute, the password.

 void

setChallengePassword(char[] password, int offset, int len, int stringType)

Sets the value of this attribute, ChallangePassword, to password.

 
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

ChallengePassword

public ChallengePassword()
Constructs an empty ChallengePassword object.

ChallengePassword

public ChallengePassword(char[] password,
                         int offset,
                         int len,
                         int stringType)
                  throws AttributeException
Constructs a ChallengePassword object and initializes it with the values given.

Parameters

         password  

A char array that contains the password.

         offset  

The offset into password where the value begins.

         len  

The length of the value.

         stringType  

The password is BER-encoded as this ASN.1 string type. This argument must be one of the following fields; ASN1.PRINT_STRING, ASN1.UNIVERSAL_STRING, ASN1.UTF8_STRING, ASN1.BMP_STRING, ASN1.IA5_STRING, or ASN1.TELETEX_STRING.

Throws

AttributeException - If the specified stringType is invalid, or if password is null.
Method Detail

setChallengePassword

public void setChallengePassword(char[] password,
                                 int offset,
                                 int len,
                                 int stringType)
                          throws AttributeException
Sets the value of this attribute, ChallangePassword, to password.

Parameters

         password  

A char array that contains this attribute's password.

         offset  

The offset into password where the value begins.

         len  

The length of the value.

         stringType  

The password is BER-encoded as this ASN.1 string type. This argument must be one of the following fields; ASN1.PRINT_STRING, ASN1.UNIVERSAL_STRING, ASN1.UTF8_STRING, ASN1.BMP_STRING, ASN1.IA5_STRING, or ASN1.TELETEX_STRING.

Throws

AttributeException - If the encoding is invalid for this extension, or if password is null.

getChallengePassword

public char[] getChallengePassword()
Gets the value of this attribute, the password.

Returns

A new char array containing the password.

clone

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

Overrides

clone in class X501Attribute

Returns

A new ChallengePassword 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 ChallengePassword, returns false otherwise.

Overrides

equals in class Object

Parameters

         obj  

The instance of the ChallengePassword object.

Returns

A boolean indicating whether these objects are equal.


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