You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Hi
Can someone help me. I still get these errors when I try to compile classes from book. Logs below:
KeyTransEnvelopedDataExample.class
xception in thread "main" org.bouncycastle.cms.CMSException: key inappropriate for algorithm.
at org.bouncycastle.cms.CMSEnvelopedDataGenerator.gen erate(Unknown Source)
at org.bouncycastle.cms.CMSEnvelopedDataGenerator.gen erate(Unknown Source)
Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at org.bouncycastle.cms.CMSEnvelopedDataGenerator$Rec ipientInf.toRecipientInfo(Unknown Source)
-----------------------------------------------------------
EnvelopedMailExample.class
Exception in thread "main" java.lang.NullPointerException
at org.bouncycastle.asn1.cms.ContentInfo.getInstance( Unknown Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSEnvelopedData.<init>(Unkno wn Source)
at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>( Unknown Source)
This normally indicates the unrestricted jurisdiction policy files
haven't been installed. There's an example program you can use to
confirm this in the first chapter - try that first and see how you go.