Hi everyone, I want to ask help from you guys to a...
# android
b
Hi everyone, I want to ask help from you guys to answer my question at Stack Overflow, it's about asymmetric encryption using RSA algorithm in Kotlin for Android env of course. I had searching the answer for days, but it's a dead end for me. Thank you all. Here's the link. https://stackoverflow.com/questions/64087039/incompatible-padding-mode-when-decyrpt-usiing-cipher-with-instance-rsa-ecb-pkcs
c
Have you debuged what
getPrivateKey()
returns?
b
I already debuged, and the
getPrivateKey()
give
AndroidKeyStoreRSAPrivateKey
object
Here is some addition information, when I'm using the OAEP padding rather than the PKCS1 padding, the code works fine
a
@bobby What phone are you trying this on? I tried your code on an API 29 emulator and it worked fine, also tried on my Pixel 3a XL with Android 11 and it worked fine.
b
Hi @Afzal Najam, sorry for my late response, I think it just my mistake, its actually worked fine, thanks foor your response, really apreciate it