{"name":"sodium-javascript","version":"0.8.0","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":"^15.0.1","tape-run":"^7.0.0"},"standard":{"ignore":["/internal/**/*.js"]},"browser":{"crypto":false,"worker_threads":false},"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":"ae2df3305e0cff68c3ae922813bfbb2d361d78de","_id":"sodium-javascript@0.8.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-rEBzR5mPxPES+UjyMDvKPIXy9ImF17KOJ32nJNi9uIquWpS/nfj+h6m05J5yLJaGXjgM72LmQoUbWZVxh/rmGg==","shasum":"0a94d7bb58ab17be82255f3949259af59778fdbc","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.8.0.tgz","fileCount":29,"unpackedSize":86834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4bZKCRA9TVsSAnZWagAAQZUP/3ESGK77PPctkfXEzLfi\nihQzsKIMEQQISARBJPGYlcxeODpat/5+v4QcX0khd1TdNe4v4gpkkxLJIt0h\nY4igC9cmZm5IA+auDd974mS7kVL/eAdYVPamk5FEqVEYF7JJroUhx6Z90T2n\nqAvO0X+1dMpUDbbI7OMia4sWXJ0HXKrP4LQ26ELdpmBg34vtrKnJfALcScHK\nh2vYGK3KOOuJvACUq8dSCniwPQ4XsnXXEiNb36zkSdVlOT6q6yFBgKPSdTPx\nlK5JfFnCa/VON8NRTtLfWlkQ8WwavZ1WKcPtaNM820HxLixh0Gp+RCSURsFM\nZ8WDIxmRRjNmBHUIBCKSQWBq6dw+7EDM+D+H0zL/ETkHOFNsyNnL29l32RyH\nQd0/tr1nRF8CAyXByL9HtvxtTcgBorqmtkLWp9Tb5vLHCo29rAnByceKGbq8\njcPcKRPyH6OIRJP9KIMwzpb0N10rPDpl1IncFq3LyKtF5wiJBoDUBNjR1O59\nDlX0MfuzZbOw8yTjDubmaJCTWasxKP2gNe3Ycz46gS31ZZiRu/8VQH1HT6rj\nqLc3q4aW+T44tl1BIbYfpUBx6B/o2jKTdgSkecnYrwXokr6kFZbjlY9dFJzp\nHR7g/J3xgh0b3hEqrPmG7HbMQdw/fBHhebI5z6YF/wlER+1rYq4hjF9smRA/\nfzfG\r\n=Ahiy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXwEwwZRLB8mYIDv5AG1aDBEQPC2+177imL6dVEDOQ+AiEA7MB0GfuOI2p/2Oe31HDb/aWYSEynMAGq501UCew0DV0="}],"size":18785,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.8.0.tgz"},"_npmUser":{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.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.8.0_1642182218653_0.24091269479664623"},"_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":1642182218872,"_cnpm_publish_time":1642182218872,"dist-tags":{"latest":"0.8.0"}}