{"name":"sodium-javascript","version":"0.7.4","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":"426ca77d479c8fd6d488c68c831d80a51c97b2e0","_id":"sodium-javascript@0.7.4","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-YUkucU81C0SUYzxcFFLOupOj89BlKA8MU8iTc7vTtd9hwgM/Awxwzz3tuoLGLHhnMxotUBB7Xl0rBeSoIn2yGQ==","shasum":"95948d1f47c673aeea9a57d7c525dead1d9cda44","tarball":"http://registry-npm.ywwl.com/sodium-javascript/download/sodium-javascript-0.7.4.tgz","fileCount":27,"unpackedSize":71993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh27jDCRA9TVsSAnZWagAAT4AP/0OmA0w5g6G1/nC6xxJ/\nYnnHvGhg8RAFhvV+8PG3qzdNwqNmJCIKm7oFVZ2XOJv91G86YYQRqeJkI82j\nwt0kYYImNmx3zN1DuaFOZw4BDln4VDX0VW187BVGvFMddmqEuSPZmiZMEooi\np5l2JFZTHi2rb7tUmvItIh3a/D0JMFsvuLNpdOSYWmA+sPDltUTfYXh1yj9J\nR8w00NjyjvCtAgzJOWloePazOFLT4ZsjioUzaI9vsAp4H8wLgXPbFvEznWqC\nu8kPMvUXt7xJtgnk3Fej0t/iaXfWFsx5uUtnYPiqhafjxH3VWZDkikEAnFZZ\nv8DTp8ipzgbKygac6xGYvqmEFyOM2WsfZIaDR24Gxhf22F8cedOASMxjL9xB\nSgv+wPMzFbko6LzwHqjOgBSUep7Pre8lLkRNr8i8pOv48T7bg7Jpb3fxPoa/\nJQHhjO28n/SrtcK7xzpyA8ofPrCbIIDufzJg/cpt22KVyoMXAqQeYTzE3eKW\nwHHou9UWkzrIXaa3A5pNzdS6QPBvTMZJI4jyUwuNEySFg3QmLTFGT6Kx8wOP\nkbOF+qg7Kd7lRJFzb8VxGie/svxyfhYwn4tgRCiWzDFhksk1RqjpYCjoUfg2\nPFxo3pT/XqlIzkbyqB5JUqrEcMK0AIl28i61d5nPxZO8Ru8hvNAOgHfxNSTX\nwGb1\r\n=HAkz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAzbrFJAAY202ObkpDoF6iGZFrozKILUv46WSWVyxYvAIgTy2d+11/WzojdSCxg2l2XebMZec167QG4rsqzXBYbxI="}],"size":16404,"noattachment":false,"key":"/sodium-javascript/-/sodium-javascript-0.7.4.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.7.4_1636104967338_0.341114406754103"},"_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":1636104967441,"_cnpm_publish_time":1636104967441,"dist-tags":{"latest":"0.8.0"}}