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

Error on Android with generateShares method #27

Open
yowlu opened this issue Mar 7, 2019 · 4 comments
Open

Error on Android with generateShares method #27

yowlu opened this issue Mar 7, 2019 · 4 comments

Comments

@yowlu
Copy link

yowlu commented Mar 7, 2019

It works great on iOS but when running the exact same code on Android I get the following error when using generateShares method:

TypeError: undefined is not a function (evaluating '(0, _base64Js.toByteArray)(base64).reverse()')

Do you know what might be happening?

@yowlu
Copy link
Author

yowlu commented Mar 8, 2019

I have been trying it more and I added a workaround for that error but now what does not work (on Android) is the combine method. Has this been tested on Android?

@hadasz
Copy link
Contributor

hadasz commented Mar 8, 2019

This does not have support for Android yet. I'll make that more clear in the README. Feel free to put in a pull request for any work arounds you might find.

Thanks for taking the time! Feel free to reach out whenever.

@yowlu
Copy link
Author

yowlu commented Mar 8, 2019

Thanks for your response!

However, I have finally used shamirs-secret-sharing for the secret sharing and react-native-crypto-js for encrypt and decrypt.

I think the secret sharing was almost working on Android by changing this line to something like

let byteArray = Object.values(toByteArray(base64)).reverse();

but then the encrypt and decrypt using the react-native-aes-crypto it also don't work as stated here so you should change the libraries you use for it.

@hadasz
Copy link
Contributor

hadasz commented Mar 8, 2019

got it, i'll look into that - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants