poowf / react-native-argon2

MIT License
5 stars 8 forks source link

How to pass a 256bit salt? #13

Open hayr-hotoca opened 3 years ago

hayr-hotoca commented 3 years ago

Thanks for your work. I want to pass a 256bit salt but the doc shows a string salt example. So can i pass a 256bit salt to this?

I tried to pass a buffer and it gave this error:

[[31,20,20,20],[0,0,1,0],[[221,100,1629384601603,false],[221],[223,30,1629384601610,false]],1271]] ERROR [Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

hayr-hotoca commented 3 years ago

I realise I need to convert a key to byte in android! In iOS Do I need to do the same?

zanechua commented 3 years ago

Yes, you'll have to implement it both for Android and iOS.

If you do implement it, open to accepting PRs to merge the ability to use bytes instead of string