react-native-sssa icon indicating copy to clipboard operation
react-native-sssa copied to clipboard

Error on Android with generateShares method

Open yowlu opened this issue 6 years ago • 4 comments

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 avatar Mar 07 '19 13:03 yowlu

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?

yowlu avatar Mar 08 '19 10:03 yowlu

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.

hadasz avatar Mar 08 '19 16:03 hadasz

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.

yowlu avatar Mar 08 '19 16:03 yowlu

got it, i'll look into that - thanks

hadasz avatar Mar 08 '19 18:03 hadasz