SecureRandom
. Because of that the Cipher throws this exception on v4.2: BadPaddingException: pad block corrupted.The solution is quite simple. Just add explicitly specified provider as the second parameter of the SecureRandom.getInstance() method:
SecureRandom sr = SecureRandom.getInstance( "SHA1PRNG", "Crypto" );
Read more here
No comments:
Post a Comment