| Modifier and Type | Class and Description | 
|---|---|
static class  | 
EncryptedContentInfo.Template
A template file for decoding a EnvelopedData blob 
 | 
| Constructor and Description | 
|---|
EncryptedContentInfo(OBJECT_IDENTIFIER contentType,
                    AlgorithmIdentifier contentEncryptionAlgorithm,
                    OCTET_STRING encryptedContent)
Create a EnvelopedData ASN1 object. 
 | 
EncryptedContentInfo(OBJECT_IDENTIFIER contentType,
                    AlgorithmIdentifier contentEncryptionAlgorithm,
                    OCTET_STRING encryptedContent,
                    boolean createHackedCRSCompatibleECI)  | 
| Modifier and Type | Method and Description | 
|---|---|
static EncryptedContentInfo | 
createCRSCompatibleEncryptedContentInfo(OBJECT_IDENTIFIER contentType,
                                       AlgorithmIdentifier contentEncryptionAlgorithm,
                                       OCTET_STRING encryptedContent)  | 
static EncryptedContentInfo | 
createPBE(PBEAlgorithm keyGenAlg,
         Password password,
         byte[] salt,
         int iterationCount,
         KeyGenerator.CharToByteConverter charToByteConverter,
         byte[] toBeEncrypted)
Creates a new EncryptedContentInfo, where the data is encrypted
 with a password-based key. 
 | 
byte[] | 
decrypt(Password pass,
       KeyGenerator.CharToByteConverter charToByteConverter)
Decrypts the content of an EncryptedContentInfo encrypted with a
 PBE key. 
 | 
void | 
encode(java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using
        its own base tag. 
 | 
void | 
encode(Tag tag,
      java.io.OutputStream ostream)
Write this value's DER encoding to an output stream using
 an implicit tag. 
 | 
AlgorithmIdentifier | 
getContentEncryptionAlgorithm()  | 
OBJECT_IDENTIFIER | 
getContentType()  | 
OCTET_STRING | 
getEncryptedContent()  | 
Tag | 
getTag()
Returns the base tag for this type, not counting any tags
 that may be imposed on it by its context. 
 | 
static EncryptedContentInfo.Template | 
getTemplate()  | 
boolean | 
hasEncryptedContent()  | 
public EncryptedContentInfo(OBJECT_IDENTIFIER contentType, AlgorithmIdentifier contentEncryptionAlgorithm, OCTET_STRING encryptedContent)
public EncryptedContentInfo(OBJECT_IDENTIFIER contentType, AlgorithmIdentifier contentEncryptionAlgorithm, OCTET_STRING encryptedContent, boolean createHackedCRSCompatibleECI)
public OBJECT_IDENTIFIER getContentType()
public AlgorithmIdentifier getContentEncryptionAlgorithm()
public OCTET_STRING getEncryptedContent()
public boolean hasEncryptedContent()
public static EncryptedContentInfo createCRSCompatibleEncryptedContentInfo(OBJECT_IDENTIFIER contentType, AlgorithmIdentifier contentEncryptionAlgorithm, OCTET_STRING encryptedContent)
public static EncryptedContentInfo createPBE(PBEAlgorithm keyGenAlg, Password password, byte[] salt, int iterationCount, KeyGenerator.CharToByteConverter charToByteConverter, byte[] toBeEncrypted) throws CryptoManager.NotInitializedException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException, java.io.CharConversionException
keyGenAlg - The algorithm for generating a symmetric key from
      a password, salt, and iteration count.password - The password to use in generating the key.salt - The salt to use in generating the key.iterationCount - The number of hashing iterations to perform
      while generating the key.charToByteConverter - The mechanism for converting the characters
      in the password into bytes.  If null, the default mechanism
      will be used, which is UTF8.toBeEncrypted - The bytes to be encrypted and stored in the
      EncryptedContentInfo. Before they are encrypted, they will be
      padded using PKCS padding.CryptoManager.NotInitializedExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenExceptionjava.io.CharConversionExceptionpublic byte[] decrypt(Password pass, KeyGenerator.CharToByteConverter charToByteConverter) throws java.lang.IllegalStateException, CryptoManager.NotInitializedException, java.security.NoSuchAlgorithmException, InvalidBERException, java.io.IOException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException, IllegalBlockSizeException, BadPaddingException
pass - The password to use in generating the PBE decryption key.charToByteConverter - The converter for converting the password
      characters into bytes.  May be null to use the default.java.lang.IllegalStateExceptionCryptoManager.NotInitializedExceptionjava.security.NoSuchAlgorithmExceptionInvalidBERExceptionjava.io.IOExceptionjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenExceptionIllegalBlockSizeExceptionBadPaddingExceptionpublic Tag getTag()
ASN1Valuepublic void encode(java.io.OutputStream ostream)
            throws java.io.IOException
ASN1Valuepublic void encode(Tag tag, java.io.OutputStream ostream) throws java.io.IOException
ASN1Valuepublic static EncryptedContentInfo.Template getTemplate()