{"name":"sodium-javascript","version":"0.5.6","description":"WIP - a pure javascript version of sodium-native","main":"index.js","dependencies":{"blake2b":"^2.1.1","nanoassert":"^1.0.0","siphash24":"^1.0.1","xsalsa20":"^1.0.0"},"devDependencies":{"browser-run":"^4.0.2","browserify":"^14.1.0","sodium-test":"^0.7.0"},"browser":{"crypto":false},"react-native":{"crypto":"crypto"},"scripts":{"browser":"browserify test.js | browser-run","browser-manual":"browserify test.js | browser-run -p 1234","test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/sodium-javascript.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/sodium-javascript/issues"},"homepage":"https://github.com/mafintosh/sodium-javascript","gitHead":"51f8fbc2d374f479fb409e277de10a8eb6d6aa9d","_id":"sodium-javascript@0.5.6","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Uk+JpqHEbzsEmiMxwL7TB/ndhMEpc52KdReYXXSIX2oRFPaI7ZDlDImF8KbkFWbYl9BJRtc82AZ/kNf4/0n9KA==","shasum":"748680f9bf0e33433d78660543afaeeec28ea199","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.5.6.tgz","fileCount":11,"unpackedSize":55149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeX7KvCRA9TVsSAnZWagAA29cP/Az+LsRYtcwfTJ5kHmOY\n8TMoMi5U318UyBT4hxS6xjo5tnY8Tu+pkXXXnaOljuyWrDTu0QSmcxt+mkqL\nPy/rbW2v3WlPZcd8yoPE/tGQaf2z5M9YbrZFy8k2Lz41tusp5J66J44JPHmj\nZ7ZmCkRO7gomf6nEqoZ6hM4YokG6vBF8tH0oIbtScDrmgwWldO5icBK5lwUR\nysYgPnCFFGcyA8jdeTp8HHubHdPKlt/XmeawxCjRVFR+B7juapLkOtPRUU/o\nDXaFXoa0Kksbc/2DyTu3qLQWGpPX3KAcyBnxJOX7u4CDpuJVbOVG73IRRjQd\noviIngHbnO2QRc+PLqXUAZnHzoKOuyxnB9ht5HhBkRR3v/bi4QeYWe/Hg6+a\nm5avybWm6pPRFx84VWMh/AlzViVb7x/U3nK1nvPBExcowum8lcKN2wM1l3eR\nOEXedhOsC6LlR9LKNMQELjmkk+RxV6AZ3dU0AynfpJYnqaUP/nHQ7iWmSJ1S\npFH2EdSOZWHCt0ujes6Tstf9vSOy5O4umx0ygCeAzRz0cPnqqGCsOdn4U1/z\nwcLMbEpfBsQJdXoguO8qK7WEinK+VTzOpQNhOY2QFBcRF8/8Yi7RJ6M+nQCB\nWj7mrWLalT0YC/4LvTgUYq4VEYF/vvlJ/NiYYrLlcV5jPv3A2qzwDGHFoc5f\npB7w\r\n=HzFP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICWhsyytDiZ1etwxZcAEchi9dzN8AB/3T3737UFKgPcKAiEAlC8lbAvyadTk4QKLzpocHz/x1M2Y2wwvJEel236CdS0="}],"size":14534,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.5.6.tgz"},"maintainers":[{"email":"github@tixz.dk","name":"emilbayes"},{"email":"mathiasbuus@gmail.com","name":"mafintosh"}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sodium-javascript_0.5.6_1583329966952_0.7956351726763271"},"_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":1583329967114,"_cnpm_publish_time":1583329967114,"dist-tags":{"latest":"0.8.0"}}