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.

guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
siddesha
siddesha
10 months ago

it helped in one of the task. thank you for this

1
0
Would love your thoughts, please comment.x
()
x