-
Notifications
You must be signed in to change notification settings - Fork 137
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
insertProviderAt(SC, 1) breaks other crypto ops #12
Comments
Why does it break other crypto? Does it replace some provider that you need? |
@tananaev yep, see the code here https://github.com/tradle/react-native-ecc/blob/master/android/src/main/java/com/rn/ecc/ECCModule.java
with passport-reader: SC
AndroidKeyStoreBCWorkaround
AndroidOpenSSL
BC
Crypto
HarmonyJSSE
AndroidKeyStore without passport reader:
|
Not sure how to solve the issue. Maybe there is a way to specify provider explicitly? |
i've googled a fair bit. One way is to insertProviderAt before the relevant code in this module, and then remove it after. However, as it's executing in the background, it will probably affect anything that happens to be using crypto at the same time. some libraries allow you to setProvider explicitly, e.g. here, but i'm not really familiar with the libraries being used here. Maybe you can check if u know where to look? |
Unfortunately I don't have much time to dedicate to this project. |
Q: is there a way to only use the Spongy/BouncyCastleProvider for the particular operations needed for chip reading/auth? Mutating the global list of providers breaks other crypto I'm doing. Thanks!
edit: i tried
addProvider()
instead, but then it doesn't scan the chipThe text was updated successfully, but these errors were encountered: