testing key sizes, still failing outside of bouncycastle

pull/124/merge
Justin Richer 13 years ago
parent 319568d971
commit 92e779257d

@ -96,7 +96,7 @@ public class RsaEncrypter extends AbstractJweEncrypter {
String encMethod = jwe.getHeader().getEncryptionMethod();
//TODO: should also check for A128GCM and A256GCM, but Cipher.getInstance() does not support the GCM mode. For now, don't use them
if(encMethod.equals("A128CBC") || encMethod.equals("A256CBC")) {
// FIXME: this is fragile
String delims = "[8,6]+";
String[] mode = encMethod.split(delims);

@ -59,7 +59,7 @@ public class RsaEncrypterDecrypterTest {
Jwe jwe = new Jwe(new JweHeader(jweHeaderObject), null, jwePlaintextString.getBytes(), null);
//generate key pair. this will be passed in from the user
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(4096);
keyGen.initialize(512);
KeyPair pair = keyGen.generateKeyPair();
PublicKey publicKey = pair.getPublic();
PrivateKey privateKey = pair.getPrivate();

Loading…
Cancel
Save