|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.pkcs7.RecipientInfo
This class defines the RecipientInfo
structure that
represents per-recipient information.
RecipientInfo ::= SEQUENCE { version Version, issuerAndSerialNumber IssuerAndSerialNumber, keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier, encryptedKey EncryptedKey } Version ::= INTEGER -- a syntax version number IssuerAndSerialNumber ::= SEQUENCE { issuer Name, serialNumber CertificateSerialNumber } -- identifies the recipient's certificate (and thereby the recipient's distinguished name and a public key) by issuer distinguished name and an issuer-specific serial number. KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier -- the key-encryption algorithm (and any associated parameters) under which the content-encryption key is encrypted with recipient's public key. EncryptedKey ::= OCTET STRING |
See Also
Constructor Summary |
|
RecipientInfo()
Constructs an empty |
Method Summary |
|
clone()
Overrides the default |
|
boolean |
equals(Object obj)
Returns |
byte[] |
getEncryptedKey()
Gets the encrypted key data. |
getEncryptionAlgorithmName()
Gets the key-encryption algorithm name. |
|
byte[] |
getEncryptionAlgorithmOID()
Gets the key-encryption algorithm OID. |
getIssuerName()
Gets the issuer name of the recipient's certificate. |
|
byte[] |
getSerialNumber()
Gets the serial number of the reciptient's certificate. |
int |
getVersionNumber()
Gets the the version number. |
void |
setEncryptionAlgorithm(byte[] encryptOID,
int offset,
int len)
Sets the key-encryption algorithm identifier. |
void |
setEncryptionAlgorithm(String algName)
Sets the key-encryption algorithm identifier, for example, RSA/PKCS1Block02Pad. |
void |
setIssuerAndSerialNumber(X500Name name,
byte[] number,
int offset,
int length)
Sets the issuer and serial number that specifies the recipient's certificate. |
void |
setVersionNumber(int version)
Sets the version number. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RecipientInfo()
RecipientInfo
object.Method Detail |
public void setVersionNumber(int version)
Parameters
version | The version number to set. |
public int getVersionNumber()
Returns
public void setIssuerAndSerialNumber(X500Name name, byte[] number, int offset, int length) throws PKCS7Exception
Parameters
name | An | ||
number | A | ||
offset | The offset into the number array. | ||
length | The length of the data in the number array. |
Throws
PKCS7Exception
- If the issuer and serial number cannot
be set or the values are null
.public X500Name getIssuerName() throws PKCS7Exception
Returns
X500Name
object that contains
the issuer distinguished name.
Throws
PKCS7Exception
- If the issuer distinguished name
cannot be returned.public byte[] getSerialNumber()
Returns
byte
array that contains the
issuer-specific serial number.public void setEncryptionAlgorithm(String algName) throws PKCS7Exception
Parameters
algName | A |
Throws
PKCS7Exception
- If algName is
invalid or null
.public void setEncryptionAlgorithm(byte[] encryptOID, int offset, int len) throws PKCS7Exception
Parameters
encryptOID | A | ||
offset | The offset into encryptOID array. | ||
len | The length of data in the encryptOID array. |
Throws
PKCS7Exception
- If the OID is null
.public byte[] getEncryptionAlgorithmOID()
Returns
public String getEncryptionAlgorithmName() throws PKCS7Exception
Returns
Throws
PKCS7Exception
- If the algorithm name cannot be retrieved.public byte[] getEncryptedKey()
Returns
public boolean equals(Object obj)
true
if this object
and obj contain the same
RecipientInfo
;
returns false
otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the
|
Returns
boolean
indicating whether
these objects are equal.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Returns
RecipientInfo
object,
a copy of this object.
Throws
CloneNotSupportedException
- If the cloning
operation is not successful.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |