react-native-simple-crypto icon indicating copy to clipboard operation
react-native-simple-crypto copied to clipboard

Why promises for hashing functions?

Open pke opened this issue 3 years ago • 5 comments

I wonder why the hashing functions are all sync natively, yet return promises? Any reason for that?

pke avatar May 04 '22 01:05 pke

That is a good question, I can work on that

ghbutton avatar May 04 '22 03:05 ghbutton

Its seems using sync function have some implications https://reactnative.dev/docs/native-modules-ios#synchronous-methods

pke avatar May 04 '22 20:05 pke

I still think making them async is the way to go

ghbutton avatar Jun 14 '22 05:06 ghbutton

Fixed here: https://github.com/ghbutton/react-native-simple-crypto/pull/44

ghbutton avatar Jun 14 '22 05:06 ghbutton

I invited you as a collaborator if that is ok

ghbutton avatar Jun 14 '22 05:06 ghbutton