lyubo / react-native-sodium

ISC License
61 stars 46 forks source link

add crypto_box_seed_keypair #37

Closed DiogoAbu closed 4 years ago

DiogoAbu commented 4 years ago

This will add crypto_box_seed_keypair that allows to derive a key pair from a seed key. Fix typo on types; Add new type relative to the function added.

Edit: I see my prettier extension formatted the type declaration file, hope that's okay. And i haven't tested it on IOS.

lyubo commented 4 years ago

Hey @DiogoAbu , thanks for this PR. What's the reason of removing the checks like this one?

      if (Sodium.crypto_secretbox_keygen(key) != 0)
        p.reject(ESODIUM,ERR_FAILURE);
DiogoAbu commented 4 years ago

Hello! I didn't remove it though... was it ever there? I mean i wrote the crypto_secretbox_keygen method, and I can't find the check anywhere on the file history. Should I add it?

Edit. Ok, I see what you mean. I set-up this repo as a upstream on my fork, updated the fork, and applied the changes that you see on this pull request. This PR is showing 7 commits, but in reality only the last commit is new code.

lyubo commented 4 years ago

Closing this one because of conflicts with master branch. Please submit a new one.