generate pkcs7 problem / help me!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

generate pkcs7 problem / help me!

Lopez Thomas
hi everybody,

i have a question about "generate pkcs7"...
I have wrote this source code:
String algorithm = EnvellopedGen.IDEA_CBC;
            CMSProcessable CMS = new CMSProcessableByteArray(buffer);
            CMSEnvelopedData EnData;
            EnData = EnvellopedGen.generate(CMS, algorithm, "BC");
            byte[] signeddata = EnData.getEncoded();
but @
            EnData = EnvellopedGen.generate(CMS, algorithm, "BC");

it make a error[exeption] "org.bouncycastle.cms.CMSException: key
inappropriate for algorithm.".

welll my java version is correct patch to envelopped > 128 bits....

Do you unserstand this error?

I'm to interresting to help.

Thanks, Rgds,
Thomas.

Reply | Threaded
Open this post in threaded view
|

generate pkcs7 problem / help me! / presition

Lopez Thomas
Hi again,

if i change :
String algorithm = EnvellopedGen.IDEA_CBC;
to
String algorithm = CMSEnvelopedDataGenerator.DES_EDE3_CBC;

i have this exeption:
org.bouncycastle.cms.CMSException: key invalid in message.

Thomas

Lopez Thomas wrote:

> hi everybody,
>
> i have a question about "generate pkcs7"...
> I have wrote this source code:
> String algorithm = EnvellopedGen.IDEA_CBC;
>            CMSProcessable CMS = new CMSProcessableByteArray(buffer);
>            CMSEnvelopedData EnData;
>            EnData = EnvellopedGen.generate(CMS, algorithm, "BC");
>            byte[] signeddata = EnData.getEncoded();
> but @
>            EnData = EnvellopedGen.generate(CMS, algorithm, "BC");
>
> it make a error[exeption] "org.bouncycastle.cms.CMSException: key
> inappropriate for algorithm.".
>
> welll my java version is correct patch to envelopped > 128 bits....
>
> Do you unserstand this error?
>
> I'm to interresting to help.
>
> Thanks, Rgds,
> Thomas.
>
>
>