Skip to content
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

Android API 23 and below does not like Mac.init with a null key #37

Closed
05nelsonm opened this issue Jun 6, 2023 · 0 comments · Fixed by #38
Closed

Android API 23 and below does not like Mac.init with a null key #37

05nelsonm opened this issue Jun 6, 2023 · 0 comments · Fixed by #38
Labels
bug Something isn't working

Comments

@05nelsonm
Copy link
Member

05nelsonm commented Jun 6, 2023

06-06 15:52:15.751  3156  3175 E TestRunner: java.security.InvalidKeyException: key == null
06-06 15:52:15.751  3156  3175 E TestRunner: 	at javax.crypto.Mac.init(Mac.java:321)
06-06 15:52:15.751  3156  3175 E TestRunner: 	at org.kotlincrypto.core.Mac.<init>(Mac.kt:60)
06-06 15:52:15.751  3156  3175 E TestRunner: 	at org.kotlincrypto.macs.Hmac.<init>(Hmac.kt:57)
06-06 15:52:15.751  3156  3175 E TestRunner: 	at org.kotlincrypto.macs.Hmac.<init>(Hmac.kt:45)
06-06 15:52:15.751  3156  3175 E TestRunner: 	at org.kotlincrypto.macs.HmacSHA3_512.<init>(HmacSHA3_512.kt:36)

Android API 23 and below seem to be affected.

As we're installing our own engine with the engineInit overridden and no-op'd, would be better to send a static key than use null in order to avoid any potential issues. It does absolutely nothing but set Mac.isInitialized to true.

@05nelsonm 05nelsonm added the bug Something isn't working label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant