{"name":"sodium-javascript","version":"0.7.1","description":"WIP - a pure javascript version of sodium-native","main":"index.js","dependencies":{"blake2b":"^2.1.1","chacha20-universal":"^1.0.4","nanoassert":"^2.0.0","sha256-universal":"^1.1.0","sha512-universal":"^1.1.0","siphash24":"^1.0.1","xsalsa20":"^1.0.0"},"devDependencies":{"browserify":"^16.5.1","sodium-test":"^0.10.0","standard":"^14.3.4","tape-run":"^7.0.0"},"standard":{"ignore":["/internal/**/*.js"]},"browser":{"crypto":false},"react-native":{"crypto":"crypto"},"scripts":{"pretest":"standard","test":"node test.js","test-browser":"browserify test.js | tape-run"},"repository":{"type":"git","url":"git+https://github.com/sodium-friends/sodium-javascript.git"},"contributors":[{"name":"Christophe Diederichs","email":"chm-diederichs@hyperdivision.dk"},{"name":"Emil Bay","email":"github@tixz.dk","url":"http://bayes.dk"},{"name":"Mathias Buus","email":"mathiasbuus@gmail.com","url":"https://mafinto.sh"}],"license":"MIT","bugs":{"url":"https://github.com/sodium-friends/sodium-javascript/issues"},"homepage":"https://github.com/sodium-friends/sodium-javascript#readme","gitHead":"66494ec3b50d9772e6d170d47a18808df35c291a","_id":"sodium-javascript@0.7.1","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-L07WHOa8+nfA2ou5i0eOnY/TBjBjoDlx8Y7/RziGEuB/T5OMATkC182xmeLZ9vlp/E+9I25RN9VEErFeB6zCuw==","shasum":"2e05b663d4d15c870c75d93f7ed0a1bfaac5a6f6","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.7.1.tgz","fileCount":27,"unpackedSize":71900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfagKeCRA9TVsSAnZWagAAja0P/jT/9H0457ZvMrpM1AhB\nti938lzhD/NZmqZTLd393HqX1W61MPODiAN/+bEyZibooXwxVvhXF7+vL1ez\ngKBsu2x9xKGzgTrsb7+mFOyf8ziVIkwI0knYyBEZ7QF+C6dJAI+F5vh4naiZ\nwFPjUkvlhuABMbu4Vem/nc7v3v70ARN9sT4jYIPoSJWSx7mE8mlDL83/2xo7\ndIqgEI9RofSGDbpbRhqFsAL7cfn7mR/Cab3Dh3h3w5nWy/F5eH5BdZ5ugQKz\nRWWPUowzGwjFoL2yfmV9RHDAgBkO2Vc1mMV/0wHKMZtlQpTMGYYqFQuH8vKW\ndS32IWka+Zzv3SH8f0LePrXv02pBoOjICwirwMcmeiOy/MZXTBmsp7mTXY+e\nwaGSnzeysdPD0oRNe8PKdPENw632veIQjORpCXOH8ZkW2RoMtUPteod7tEtr\n6KWaFwRQ47ogl6nBVkl261poWKXW2dmdLmkP6kcjdWwRYUyUXez4mhD4xCmf\nStIr3Ugfyd3J5KyCCoWlQf5V4G1EeHmNhfxSgcsh9qSGq89JJ5bJU8AcSY3c\nwp1LSITp4ecG8n9W9RNRNItcFygNl98vOpoqGL6m6cBoew3G7qY0rasrDqQp\nzfmv6EayAV3Mhnln4S3Lymmu55sVxIrrGqVtl826G4+6XO82c8bPo0wWa3JZ\nj/Af\r\n=Q75o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiZ7zWldd+PPt6BZZoh4PMB4ZSPC2mxEAXwFqsWsW3tAiBiacZ3KjFUqFhTCxLYW7KXikPJK5EuOyniwAz+yo/lyg=="}],"size":16373,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.7.1.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"}],"_npmUser":{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sodium-javascript_0.7.1_1600783005184_0.8684208457908336"},"_hasShrinkwrap":false,"readme":"# `sodium-javascript`\n\n[![Build Status](https://travis-ci.org/sodium-friends/sodium-javascript.svg?branch=master)](https://travis-ci.org/sodium-friends/sodium-javascript)\n\n> WIP - a pure javascript version of [sodium-native](https://github.com/sodium-friends/sodium-native).\nBased on tweetnacl\n\n## Usage\n\n``` js\nconst sodium = require('sodium-javascript')\n\nconst key = Buffer.alloc(sodium.crypto_secretbox_KEYBYTES)\nconst nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES)\n\nsodium.randombytes_buf(key)\nsodium.randombytes_buf(nonce)\n\nconst message = Buffer.from('Hello, World!')\nconst cipher = Buffer.alloc(message.length + sodium.crypto_secretbox_MACBYTES)\n\nsodium.crypto_secretbox_easy(cipher, message, nonce, key)\n\nconsole.log('Encrypted:', cipher)\n\nconst plainText = Buffer.alloc(cipher.length - sodium.crypto_secretbox_MACBYTES)\n\nsodium.crypto_secretbox_open_easy(plainText, cipher, nonce, key)\n\nconsole.log('Plaintext:', plainText.toString())\n```\n\n## API\n\nSee [sodium-native](https://github.com/sodium-friends/sodium-native).\nThis is a work in progress so not all functions are implemented yet.\n\nThis module is organised into individual submodules which can be required\nindependently for smaller bundles in the browser. To leverage automatic\nswitching between `sodium-javascript` and `sodium-native`, see\n[`sodium-universal`](https://github.com/sodium-friends/sodium-universal).\n\n## Install\n\n```\nnpm install sodium-javascript\n```\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1600783005657,"_cnpm_publish_time":1600783005657,"dist-tags":{"latest":"0.8.0"}}