-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I got next error, when use encryption in Unit tests:
java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.implInit(Cipher.java:805)
at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
at javax.crypto.Cipher.init(Cipher.java:1396)
at javax.crypto.Cipher.init(Cipher.java:1327)
at ru.bullyboo.encoder.methods.AES.encrypt(AES.java:179)
at ru.bullyboo.encoder.builders.BuilderAES.encryption(BuilderAES.java:97)
at ru.bullyboo.encoder.builders.BaseBuilder.encrypt(BaseBuilder.java:212)
Code:
public String encrypt(String value) {
return Encoder.BuilderAES()
.message(value)
.method(AES.Method.AES_CBC_PKCS5PADDING)
.key(BuildConfig.APPLICATION_ID)
.keySize(AES.Key.SIZE_256)
.iVector(VECTOR)
.encrypt();
}Metadata
Metadata
Assignees
Labels
No labels