{"name":"sodium-javascript","version":"0.6.0","description":"WIP - a pure javascript version of sodium-native","main":"index.js","dependencies":{"blake2b":"^2.1.1","chacha20-universal":"^1.0.4","nanoassert":"^1.0.0","sha256-wasm":"^1.3.0","sha512-wasm":"^1.2.0","siphash24":"^1.0.1","xsalsa20":"^1.0.0"},"devDependencies":{"browser-run":"^4.0.2","browserify":"^14.1.0","sodium-test":"^0.9.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":"fc90cbedbad4ea32394f56b6355c8db38168ad6b","_id":"sodium-javascript@0.6.0","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-GuVvpOY2ipJIxjCi9SRDcSOk+YRIUE2qgBjvgkyqyNTB+mglx1HkJpPqWhKfBHEAktMbHb21qYBTUy9VLhwvGg==","shasum":"9fd6d6f761ccedbdac59093ca9280670d3407407","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.6.0.tgz","fileCount":24,"unpackedSize":59226,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe64VxCRA9TVsSAnZWagAA6jEP/3ope89auV8AgFiDhEPU\nliO20JoruP1XYrTeV4M7ABt7vvM6CItSppS3D5oAD5HxH1LPyI85BhW9gvdq\nu8z81DH60E5WWUbKsoLva4YpmXWzv2UegC/GJJm20Z8RbQH7w+miW0GcYg+F\nj443ACUpSbAk4W3mAOY9f5+hPzncC2PXOq7zQ3wXWK29opofW44V8oVezSML\nHN9FkF6lzMwZTw4z9//jIZSLnAKs1FWjb2adzlUztNi+CstRiyZks/5CRLJ4\nXRcL3MlElkQllrGIGD5Kh+So+1OJLD6bBzy9elsXwDthHuvB8EIupHrF21Si\ntpOEXZT9+xsowCSrMs2jkfCjbMUntNQP8rV+PMQvAvCLE8KyY4zLYwz/9JfW\n2JLBNSp8e2vIUe4YBGCd40FN5sGUiQmsckfM/mXoma3gRybfHIBKnCiCBe0Y\nQgcqgcDVrDnL0rbKLWX3rhdz3ifDG+BXyKKUGbT/RuRIrYOGYiw+z5q07qIE\n49tLSYZ7ppRoceFHUmFa1h4m08sPjCg/0w5R5ES7oeCLKlUek9PTG7Z5ohyX\nHDgcSh1uqtX4v677NKJduTXZFpWWItLd8c3WetEPgGQDWbsrfYORHdbuvNY1\nilZ8eTIn20oyCnZFlJQxDoAxQGJph6bH2qlpRBtmlzTxRYcFaC7u7Vl7g9fY\nzCyY\r\n=ejcN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOAz2JFD9e1ordpfDijedcn1UQeLjUFdeWItnW9pyueAIgAUhlyRDjLRuQoUm+DHjReBCCgBNeyfiEGR7tYojy4f4="}],"size":13790,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.6.0.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.6.0_1592493425284_0.5624526555455023"},"_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":1592493425401,"_cnpm_publish_time":1592493425401,"dist-tags":{"latest":"0.8.0"}}