-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play Integrity Exception "org.jose4j.lang.IntegrityException: A256KW key unwrap/decrypt failed" #226
Comments
Hey @Jitendran , it doesn't look like the code that using |
Hey @dvsekhvalnov , Thanks for your reply. implementation 'com.google.android.play:integrity:1.1.0' |
@Jitendran i got it :) I can't comment on those ones, i can comment on |
On C# I managed to solve it like mentioned here : #202 |
Thanks @dishanphilips for your reply. |
If you guys good with your question, feel free to close ticket. |
Hi @Jitendran, did u managed to fix it in ur app? |
Hi @KubinkiewiczDawid , we was facing this issue before the app was not live when we live the app in Play store after that we are not facing this issue. |
We follow the below google and separate 1 developer blog
Google doc
https://developer.android.com/google/play/integrity/verdict#decrypt-verify-locally
1 developer blog
https://hoven.in/cpp-projects/play-integrity-api-2.html
https://hoven.in/cpp-projects/play-integrity-api-3.html
We are getting this "org.jose4j.lang.IntegrityException: A256KW key unwrap/decrypt failed" exception in below try catch block line.
"compactJws = jwe.payload"
// This is the code we are using for Play integrity
val str = "AIzaSyBPF4dLN4SLxNlraMWUD2FpUrfE39qvF_E"
val strBytes = Base64.decode(str, Base64.DEFAULT)
val encoded = Base64.encode( strBytes, Base64.URL_SAFE or Base64.NO_PADDING or Base64.NO_WRAP )
val nonce = String(encoded)
val DECRYPTION_KEY = "xcClpnhjH0JQrwcJ…./9TPiTqr34Nmqs="
val VERIFICATION_KEY = "MFkwEwYHKoZIzj0CAQYI….AEuzmUjHs7b7Z7NUgbKmq/5AJfpeMbjh/10yNlQllYlDz1DRIisRMbLI/4yDIO95VWgcfrrnSyIPKBMRFiFEZE3Q=="
val integrityManager = IntegrityManagerFactory.create(applicationContext)
val integrityTokenResponse = integrityManager.requestIntegrityToken(IntegrityTokenRequest.builder()
.setNonce(nonce)
.setCloudProjectNumber(70102…724)
.build()
)
.addOnSuccessListener(
(OnSuccessListener { response: IntegrityTokenResponse ->
val integrityToken = response.token()
val decryptionKeyBytes: ByteArray =
Base64.decode(DECRYPTION_KEY, Base64.DEFAULT)
The text was updated successfully, but these errors were encountered: