
For background on why doing this works, see below. I don't want to change how we get our Cipher instance in non-test code, since PKCS7 always works on Android. It's only when the tests are running on a non-Android host machine that they can fail. An alternative would be to make it an androidTest, but androidTests are slow. ------ Background: "While Java considers PKCS5 and PKCS7 padding to be the "same" (and one should always use the string "AES/CBC/PKCS5Padding" because "AES/CBC/PKCS7Padding" will cause NoSuchAlgorithmException to be thrown when initializing an AES block cipher using the Java crypto API), I consider this a gross misnaming in the Java platform because the pure technical definitions of these paddings are not the same." Ref: https://stackoverflow.com/questions/10193567/java-security-nosuchalgorithmexceptioncannot-find-any-provider-supporting-aes-e ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207234518