Hi!
The problem arises when I try to decrypt a string from the server (using the same library) with a custom iv and key.
Android [Kotlin]
`val cryptLib = CryptLib()
val iv = "iv"
val key = "key"
val cipherText = "7ESDDdYDbnUh2hqGhAKGbEZKpwa14mEiT553b3etgjc="
val resultText = cryptLib.decryptCipherText(cipherText, key, iv)`
The app crash and return this:
javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
Caused by: javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
at com.android.org.conscrypt.OpenSSLCipher$EVP_CIPHER.doFinalInternal(OpenSSLCipher.java:602)
at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:365)
at javax.crypto.Cipher.doFinal(Cipher.java:2055)
Hi! The problem arises when I try to decrypt a string from the server (using the same library) with a custom iv and key.
Android [Kotlin]
`val cryptLib = CryptLib() val iv = "iv" val key = "key" val cipherText = "7ESDDdYDbnUh2hqGhAKGbEZKpwa14mEiT553b3etgjc="
val resultText = cryptLib.decryptCipherText(cipherText, key, iv)`
The app crash and return this: javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
Caused by: javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method) at com.android.org.conscrypt.OpenSSLCipher$EVP_CIPHER.doFinalInternal(OpenSSLCipher.java:602) at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:365) at javax.crypto.Cipher.doFinal(Cipher.java:2055)
Thanks for the help.