How to solve ProGuard errors: can’t find referenced class javax.crypto.Cipher

You are getting the following errors when using ProGuard to obfuscate your jar library, which uses classes in the javax.crypto.* package:

[proguard] Warning: com.bytenota.crypto.AESEncryption: can't find referenced class javax.crypto.Cipher
[proguard] Warning: com.bytenota.crypto.AESEncryption: can't find referenced class javax.crypto.spec.SecretKeySpec
[proguard] Warning: com.bytenota.crypto.AESEncryption: can't find referenced class javax.crypto.spec.IvParameterSpec

To solve this errors, you need to specify the jce.jar in your ProGuard configuration.

obfuscation.pro
-libraryjars  <java.home>/lib/jce.jar

Yeah, that is it.

0 0 vote
Article Rating
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x