{"name":"sodium-javascript","version":"0.7.2","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,"worker_threads":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":"51093efbc509f837ed64204e98324ba6b1912d76","_id":"sodium-javascript@0.7.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-tZGGiG2SvaN9AlgHwoNCn469rJlxxPi6B0PgcBAaVSUBnnDIYeN3nvyo23GfquyhwSXxZCvUGrctIHBKGeKsjg==","shasum":"db8a59a7b055deba09dbf0191d9e16c07f0e1efe","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.7.2.tgz","fileCount":28,"unpackedSize":72625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfrTzBCRA9TVsSAnZWagAA8EIP/j67qr6to+ktPCniWuPA\nfYH7PvQupmKayfTyNCIeENtnWDpHNgLsm7Owj16MKqD4Sg7k5gPJJv5S3fVe\nFnWnhtuFsW2yoYOipHdVEh8CJiqgHiAxYhzpHzgF/bEdvT0T6IQmNkX3qKbE\n6GcX0AdjZoEMDctWaQpnYZ/nymY+9wpx0xwNYYMUgBgSFo8pu90wrbV5JMUC\n7hPvKpr4NVARae4M/tDRNZK/bgHgtewVmn02tyd/ROR3Hhu5xqEOAhdSBd9G\nKYnJmqA/hxegAhpbmrFSXp7zhsED7j3XPP/er1doMn8244BhDVubjEF7Uc4A\nJwEHGVEbH2A/4pRet7rMtdRkKn2NGXBC5sTj/FM4MKs5Sz7hxns4CaZNMYJb\nimwfopFwyfF/b46FFGfDBceYAb99bXqPTwMpDeWU4HWiNNyEvnNW5doovudb\nCcofBJeBwp4Q/j1jp8qQC3hobVplmULsAnuBYpn+NFrkEV7E8LfznAJIwmCI\nRgFg7plZzgoKMpwzg8hBD5jt+jaxKS1u6OdSjqrd5VHioQ016vr4o+5kg/4d\nsnesHnFu+4hMhwsUg5VPGqV6jbRKTMIdK+oXidW6cEIqnkacj1ODzEjJ+qjQ\ng029znKcOjKAB7nTFlVVj1dsRoM0Tqv/cl5l2Cv73Jk5H2+GOUgTomtA47Y0\n2TIJ\r\n=6Aaq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9ubkbGJYZF8riLB6GETgwN3JloAwOkyla2nFuJs5vcgIgL+Q+yHUN1D2PzTHXqcUiGvrAX4NaUoMGo11W/OHa6cQ="}],"size":16421,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.7.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"emilbayes","email":"github@tixz.dk"},{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sodium-javascript_0.7.2_1605188800401_0.15030629528887207"},"_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":1605188800559,"_cnpm_publish_time":1605188800559,"dist-tags":{"latest":"0.8.0"}}