holepunchto / sodium-native

Low level bindings for libsodium
MIT License
304 stars 66 forks source link

Missing methods: _keygen() #135

Closed christianbundy closed 7 months ago

christianbundy commented 4 years ago

I'm doing some mad science where I'm using libsodium.js to test (and eventually fuzz) sodium-native to ensure that everything works similarly. I've built a small adapter layer that takes the Sodium-Friends API and converts it to work with the libsodium.js API, and after a few hours of work I have adapter functions for most of the methods. I'm unfortunately missing a few:

Would you accept a patch to add these three methods to Sodium-Native?

Tests I'm using are here: https://github.com/christianbundy/libsodium.js/blob/sodium-chloride/test/sodium_utils.js

The adapter that I'm building is here: https://github.com/christianbundy/libsodium.js/blob/sodium-chloride/test/sodium-chloride.js

emilbayes commented 4 years ago

Yep, these are all just generating random bytes based on their respective KEYBYTES constants

emilbayes commented 4 years ago

Ah sorry, wrong repo. But sure, expose them :)