jerson / react-native-fast-openpgp

OpenPGP for react native made with golang for fast performance
https://www.npmjs.com/package/react-native-fast-openpgp
MIT License
44 stars 18 forks source link

Cannot use encrypt #16

Closed c-cchi closed 3 years ago

c-cchi commented 3 years ago

Hello ! First of all, thank you for creating this package !

I tried to create a new project with react-native-fast-openpgp, but I got an error when I use encrypt

Error: Error Domain=go Code=1 "openpgp: invalid argument: cannot encrypt because no candidate hash functions are compiled in. (Wanted RIPEMD160 in this case.)" UserInfo={NSLocalizedDescription=openpgp: invalid argument: cannot encrypt because no candidate hash functions are compiled in. (Wanted RIPEMD160 in this case.)}

I checked the github of Golang https://github.com/golang/crypto/blob/173ce04bfaf66c7bb0fa9d5c0bfd93e773909dbd/openpgp/s2k/s2k.go#L226 Not sure if the problem is from here.

and I tried to execute upgrade_lib_bridge.sh but it failed. It seems that we have to separate
wget -c "$FILE_URL" -O - | tar --strip-components=1 -xz -C "$OUTPUT_DIR" "$OUTPUT_SUB_DIR" into two command lines

Just noticed some error, hope it might be helpful :) Anyway, thanks for your contribution !

jerson commented 3 years ago

hi @c-cchi thanks for report the issue, I released a new version with a possible fix for that, could help me to test please https://www.npmjs.com/package/react-native-fast-openpgp/v/1.6.4

c-cchi commented 3 years ago

I tried to rebuild again with version 1.6.4, still got the same error Should I do some extra installation ? Thanks for your reply !

Update ::: 21 April 2021 I just noticed something I did wrong ! It works well ! I'm really sorry !

And many thanks for the package !

jerson commented 3 years ago

thanks to you im going to test more to avoid those issues in the future :D