lyubo / react-native-sodium

ISC License
61 stars 46 forks source link

wrap crypto_pwhash #18

Closed sfeese closed 5 years ago

sfeese commented 5 years ago

exposes crypto_pwhash and corresponding constants to js

lyubo commented 5 years ago

Thank you for your PR.

Just few notes:

You changed the definition of crypto_sign_keypair function RCTSodium.h

Also, you removed the following line from RCTSodiumModule.java: constants.put("crypto_sign_BYTES", Sodium.crypto_sign_bytes());

Are these commited by accident? If so please, create new PR with those two fixed.

Also, it would be very appreciated if you create a test for this function in corresponding example project.

lyubo commented 5 years ago

I just saw that you don't release all arrays (sodium-jni.c). Each GetByteArrayElements should have corresponding ReleaseByteArrayElements. Please fix this!

sfeese commented 5 years ago

Thanks your review. I've fixed your comments.

lyubo commented 5 years ago

Thanks. Create new PR with the fixes, and I'll merge it.