public class CMSKeyTransRecipientInfo extends CMSRecipientInfo
CMSRecipientInfo, CMSKeyTransRecipientInfoSpec| Constructor and Description |
|---|
CMSKeyTransRecipientInfo()
Creates an empty
CMSKeyTransRecipientInfo. |
CMSKeyTransRecipientInfo(byte[] hmacKey, java.lang.String hmacKeyAlgo, java.security.PublicKey keyEncryptionKey, byte[] spki, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
Creates a
CMSKeyTransRecipientInfo. |
CMSKeyTransRecipientInfo(byte[] hmacKey, java.lang.String hmacKeyAlgo, java.security.PublicKey keyEncryptionKey, oracle.security.crypto.cert.IssuerAndSerialNo iasn, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
Creates a
CMSKeyTransRecipientInfo. |
CMSKeyTransRecipientInfo(java.io.InputStream is)
Creates a
CMSKeyTransRecipientInfo by reading the BER encoding from the specified input stream. |
CMSKeyTransRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, java.security.PublicKey keyEncryptionKey, byte[] spki, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
Creates a
CMSKeyTransRecipientInfo. |
CMSKeyTransRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, java.security.PublicKey keyEncryptionKey, oracle.security.crypto.cert.IssuerAndSerialNo iasn, oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
Creates a
CMSKeyTransRecipientInfo. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
byte[] |
getContentAuthenticationKey(java.security.PrivateKey keyDecryptionKey)
Derives the content authentication key, by decryption the encrypted key stored in this object with the given key decryption key.
|
byte[] |
getContentEncryptionKey(java.security.PrivateKey keyDecryptionKey)
Derives the content encryption key, by decryption the encrypted key stored in this object with the given key decryption key.
|
byte[] |
getContentEncryptionKey(java.security.PrivateKey keyDecryptionKey, java.lang.String contentEncryptionAlgo)
Derives the content encryption key, by decryption the encrypted key stored in this object with the given key decryption key.
|
byte[] |
getEncryptedKey()
Returns the encrypted content encryption key.
|
oracle.security.crypto.cert.IssuerAndSerialNo |
getIASN()
Returns the IssuerAndSerialNo recipient identifier.
|
oracle.security.crypto.cert.X500Name |
getIssuer()
Returns the issuer of the recipient's certificate.
|
java.lang.String |
getKeyAlgo()
This method returns the ContentEncryptionkey's Algorithm.
|
oracle.security.crypto.core.AlgorithmIdentifier |
getKeyEncryptionAlgID()
Returns the Key Wrapping or Encipherment Algorithm.
|
java.math.BigInteger |
getSerialNo()
Returns the serial number of the recipient's certificate.
|
byte[] |
getSPKI()
Returns the Subject Public Key Identifier.
|
oracle.security.crypto.asn1.ASN1Integer |
getVersion()
Deprecated.
As of Phaos CMS 2.0.1, replaced by
getVersionNumber() |
java.math.BigInteger |
getVersionNumber()
Returns the version number.
|
int |
hashCode()
Returns a hash code value for this object.
|
protected void |
inputRecipientInfo(java.io.InputStream is)
Reads the CMSRecipientInfo structure.
|
int |
length()
Returns the length of this object's encoding.
|
void |
output(java.io.OutputStream os)
Output this object's encoding to the specified output stream.
|
java.lang.String |
toString()
A brief textual description of this object.
|
boolean |
useSPKI64()
Indicated if SPKI is being used as the Recipient Identifier.
|
input, inputInstancepublic CMSKeyTransRecipientInfo()
CMSKeyTransRecipientInfo.
public CMSKeyTransRecipientInfo(javax.crypto.SecretKey contentEncryptionKey,
java.security.PublicKey keyEncryptionKey,
oracle.security.crypto.cert.IssuerAndSerialNo iasn,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
CMSKeyTransRecipientInfo.
Note the changes in the Method signature
Previously public CMSKeyTransRecipientInfo (SymmetricKey ,oracle.security.crypto.core.PublicKey , IssuerAndSerialNo, AlgorithmIdentifier )
Now public CMSKeyTransRecipientInfo (SecretKey , java.security.PublicKey , IssuerAndSerialNo, AlgorithmIdentifier )
Exceptions no longer thrown --AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
contentEncryptionKeyBytes - The content Encryption key ByteskeyEncryptionKey - The key encipherment(wrap) key.iasn - Issuer and Serial Number (IASN) of the recipient's certificate.keyEncryptionAlgID - The key encipherment(wrap) algorithm.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected padding
public CMSKeyTransRecipientInfo(java.io.InputStream is)
throws java.io.IOException
CMSKeyTransRecipientInfo by reading the BER encoding from the specified input stream.is - The input stream.java.io.IOException - If the input encoding is incorrect or an I/O error occurs.
public CMSKeyTransRecipientInfo(javax.crypto.SecretKey contentEncryptionKey,
java.security.PublicKey keyEncryptionKey,
byte[] spki,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
CMSKeyTransRecipientInfo.
Note the changes in the Method signature
Previouslypublic CMSKeyTransRecipientInfo (SymmetricKey , oracle.security.crypto.core.PublicKey , byte[], AlgorithmIdentifier )
Now public CMSKeyTransRecipientInfo (SecretKey , java.security.PublicKey , byte[], AlgorithmIdentifier )
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
contentEncryptionKey - The ContentEncryption KeykeyEncryptionKey - The key encipherment(wrap) key.spki - The recipient's Subject Public Key Identifier(SPKI) value.keyEncryptionAlgID - The key encipherment(wrap) algorithm.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected paddingCMSUtils
public CMSKeyTransRecipientInfo(byte[] hmacKey,
java.lang.String hmacKeyAlgo,
java.security.PublicKey keyEncryptionKey,
oracle.security.crypto.cert.IssuerAndSerialNo iasn,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
CMSKeyTransRecipientInfo.
Note the changes in the Method signature
Previouslypublic CMSKeyTransRecipientInfo (byte[], oracle.security.crypto.core.PublicKey , IssuerAndSerialNo , AlgorithmIdentifier )
Now public CMSKeyTransRecipientInfo (byte[],java.security.PublicKey , IssuerAndSerialNo , AlgorithmIdentifier )
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
hmacKey - The HMAC key.keyEncryptionKey - The key encipherment(wrap) key.spki - The recipient's Subject Public Key Identifier(SPKI) value.keyEncryptionAlgID - The key encipherment(wrap) algorithm.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected padding
public CMSKeyTransRecipientInfo(byte[] hmacKey,
java.lang.String hmacKeyAlgo,
java.security.PublicKey keyEncryptionKey,
byte[] spki,
oracle.security.crypto.core.AlgorithmIdentifier keyEncryptionAlgID)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
CMSKeyTransRecipientInfo.
Note the changes in the Method signature
Previouslypublic CMSKeyTransRecipientInfo (byte[], oracle.security.crypto.core.PublicKey , byte[], AlgorithmIdentifier )
Now public CMSKeyTransRecipientInfo (byte[],java.security.PublicKey , byte[] , AlgorithmIdentifier )
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
hmacKey - The MAC key.keyEncryptionKey - The key encipherment(wrap) key.spki - The recipient's Subject Public Key Identifier(SPKI) value.keyEncryptionAlgID - The key encipherment(wrap) algorithm.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected paddingpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objecttrue if this object is the same as the obj argument; false otherwise.public oracle.security.crypto.cert.IssuerAndSerialNo getIASN()
IssuerAndSerialNo recipient identifier or null if SPKI is used as the recipient identifier.public java.math.BigInteger getSerialNo()
public oracle.security.crypto.cert.X500Name getIssuer()
public oracle.security.crypto.core.AlgorithmIdentifier getKeyEncryptionAlgID()
public byte[] getEncryptedKey()
public byte[] getSPKI()
public boolean useSPKI64()
true if SPKI is being used; false if IASN is being used.public java.lang.String getKeyAlgo()
public byte[] getContentEncryptionKey(java.security.PrivateKey keyDecryptionKey)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
Note the changes in the Method signature
Previously public SymmetricKey getContentEncryptionKey (oracle.security.crypto.core.PrivateKey )
Now public byte[] getContentEncryptionKey (java.security.PrivateKey)
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
keyDecryptionKey - The key decryption key.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected padding
public byte[] getContentEncryptionKey(java.security.PrivateKey keyDecryptionKey,
java.lang.String contentEncryptionAlgo)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
Note the changes in the Method signature
Previously public SymmetricKey getContentEncryptionKey (oracle.security.crypto.core.PrivateKey )
Now public byte[] getContentEncryptionKey (java.security.PrivateKey)
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
keyDecryptionKey - The key decryption key.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected padding
public byte[] getContentAuthenticationKey(java.security.PrivateKey keyDecryptionKey)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
Note the changes in the Method signature
Previously public byte[] getContentAuthenticationKey (oracle.security.crypto.core.PrivateKey )
Now public byte[] getContentAuthenticationKey (java.security.PrivateKey)
Exceptions no longer thrown -- AlgorithmIdentifierException and CipherException . Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException , BadPaddingException
keyDecryptionKey - The key decryption key.java.security.InvalidKeyException - The encryption keys are not valid.java.security.NoSuchAlgorithmException - Algo not availablejavax.crypto.NoSuchPaddingException - Requested Padding not availablejavax.crypto.IllegalBlockSizeException - Length of data doesnt match block sizejavax.crypto.BadPaddingException - Data without expected paddingpublic java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.ASN1Integer getVersion()
getVersionNumber()getVersion in class CMSRecipientInfo
protected void inputRecipientInfo(java.io.InputStream is)
throws java.io.IOException
CMSRecipientInfoThe input stream is positioned at the beginning of the tag octet of the SEQUENCE encoding.
inputRecipientInfo in class CMSRecipientInfois - The input stream.java.io.IOException - The encoding is incorrect or an I/O error occurs.
public void output(java.io.OutputStream os)
throws java.io.IOException
os - The specified output stream.java.io.IOException - An I/O error occurred.public int length()
public java.lang.String toString()
toString in class java.lang.Object