[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


(iaik.pkcs.pkcs7.EncryptedContentInfp  and PBE
In this example code, after
	Random random = new Random();
            byte[] salt = new byte[8];
            byte[] data =.......................
            PBEParameterSpec param = new PBEParameterSpec( salt,  1 );
            PBEKey pbeKey = new PBEKey( "password" );
            EncryptedContentInfo eci = new EncryptedContentInfo(
ObjectID.pkcs7_data,  data );
            eci.setupCipher( AlgorithmID.pbeWithMD5AndDES_CBC , pbeKey,
param );
            byte[] encoding = eci.getEncoded();

I continue with 

            EncryptedContentInfo eci1 = new EncryptedContentInfo(
ObjectID.pkcs7_data, encoding );
(*) 	eci1.setupCipher( pbeKey ); // for decryption 

and i cacth in (*) 
	iaik.pkcs.PKCSException: Unable to get algorithm parameter!

If  I  try also to get AgorithmID  from eci1 with

	AlgorithmID aid = eci1.getContentEncryptionAlgorithm();
I  have    aid == null;

Have you suggestions?

Thanks in advance
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce