> The reason it worked before is that it was probably falling back to using 
> the 
> IV included with the key (Cf. the class name). PBE algorithms can derive 
> both the key and the IV from the password. 
>

Bingo!

Changing the IV on an older device doesn't affect decryption :-)

>
> Convert your key to a 'plain' key with something like this and is should 
> work 
>
> SecretKey sk1  = new SecretKeySpec(sk.getEncoded(), "AES"); 
>

Yep, that fixes that error, but now the decryption fails (doFinal).

I'm way out of my depth here, but does it make sense to use getIV() on the 
cipher
on the old device and then set that as the IV on the new one ?

Pent

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to