Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ed.makeKeypair = function (hash) {
const keyPair = {
publicKey: Buffer.alloc(sodium.crypto_sign_PUBLICKEYBYTES),
privateKey: Buffer.alloc(sodium.crypto_sign_SECRETKEYBYTES)
};
sodium.crypto_sign_seed_keypair(keyPair.publicKey, keyPair.privateKey, hash);
return keyPair;
};