How to use the sodium-javascript.crypto_sign_PUBLICKEYBYTES function in sodium-javascript

To help you get started, we’ve selected a few sodium-javascript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AraiEzzra / DDKCORE / backlog / helpers / ed.js View on Github external
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;
};

sodium-javascript

WIP - a pure javascript version of sodium-native

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Similar packages