Re: [android-developers] Cipher.wrap() not working in Android 4.2?
You can also try deriving the wrap key separately with something like:
KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt,
ITERATION_COUNT, KEY_LENGTH);
SecretKeyFactory keyFactory = SecretKeyFactory
.getInstance("PBKDF2WithHmacSHA1");
SecretKey key = keyFactory.generateSecret(keySpec);
And initialize the Cipher in WRAP mode with this SecretKey.
Good thought, but it also does not work. The problem is the same: java.lang.UnsupportedOperationException, when I try to wrap the key. This only happens in Android 4.2. Everything works fine in 4.1 and every other previous version I've tested.
Matthew
-- You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home