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

[iaik-jce] BadPaddingException when using PKCS1Padding



Hello,

The following code is producing a java crypto
BadPaddingException:

Cipher ras = Cipher.getInstance("RSA", "IAIK");
// that should get RSACipher with pkcs1 padding right?
rsa.init(Cipher.ENCRYPT_MODE, privateKey);
byte[] sig = rsa.doFinal(enc_digest);

The message is "Padding String must be at least 8
octets long!"

Simple enough, but what am I doing wrong?

Thanks!
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

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