{"_id":"tweetnacl-util","_rev":"4578740","name":"tweetnacl-util","description":"String encoding utilitlies extracted from TweetNaCl.js","dist-tags":{"latest":"0.15.1"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"time":{"modified":"2026-04-10T15:51:52.000Z","created":"2016-02-19T23:16:55.732Z","0.15.1":"2020-01-29T23:38:50.852Z","0.15.0":"2017-03-19T19:32:18.473Z","0.14.0":"2017-02-22T11:33:47.574Z","0.13.5":"2016-12-13T11:15:41.547Z","0.13.4":"2016-12-08T23:57:38.559Z","0.13.3":"2016-02-19T23:16:55.732Z"},"users":{},"author":{"name":"TweetNaCl-js contributors"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"versions":{"0.15.1":{"name":"tweetnacl-util","version":"0.15.1","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","types":"nacl-util.d.ts","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js","test":"tape test/*.js; yarn run build-browser-test","build-browser-test":"browserify test/test.js > test/browser/bundle.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Unlicense","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"browserify":"^16.5.0","tape":"^4.13.0","uglify-js":"^3.7.6"},"browser":{"buffer":false},"gitHead":"3f4e483e8c17e52bf4571d0fe09c4beb0dca6905","_id":"tweetnacl-util@0.15.1","_nodeVersion":"13.6.0","_npmVersion":"6.13.4","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"b80fcdb5c97bcc508be18c44a4be50f022eea00b","size":3338,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.15.1.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tweetnacl-util_0.15.1_1580341130615_0.6437882161656399"},"_hasShrinkwrap":false,"publish_time":1580341130852,"_cnpm_publish_time":1580341130852,"_cnpmcore_publish_time":"2021-12-14T15:39:44.900Z"},"0.15.0":{"name":"tweetnacl-util","version":"0.15.0","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","types":"nacl-util.d.ts","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js","test":"tape test/*.js; yarn run build-browser-test","build-browser-test":"browserify test/test.js > test/browser/bundle.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Unlicense","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"browserify":"^14.1.0","tape":"^4.6.3","uglify-js":"^2.6.1"},"browser":{"buffer":false},"gitHead":"e2d5a8052c8631a71c7840f50b09a8f182dbbadc","_id":"tweetnacl-util@0.15.0","_shasum":"4576c1cee5e2d63d207fee52f1ba02819480bc75","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"4576c1cee5e2d63d207fee52f1ba02819480bc75","size":3295,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.15.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.15.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tweetnacl-util-0.15.0.tgz_1489951936531_0.6709871268831193"},"directories":{},"publish_time":1489951938473,"_hasShrinkwrap":false,"_cnpm_publish_time":1489951938473,"_cnpmcore_publish_time":"2021-12-14T15:39:45.157Z"},"0.14.0":{"name":"tweetnacl-util","version":"0.14.0","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","types":"nacl-util.d.ts","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Unlicense","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"uglify-js":"^2.6.1"},"browser":{"buffer":false},"gitHead":"f9374aef8793a45876c5982222fd9c0cf02ab292","_id":"tweetnacl-util@0.14.0","_shasum":"59fd62db776f14d6cc4e4cbee654043ca618c815","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"59fd62db776f14d6cc4e4cbee654043ca618c815","size":2935,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.14.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.14.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tweetnacl-util-0.14.0.tgz_1487763225802_0.3109755178447813"},"directories":{},"publish_time":1487763227574,"_hasShrinkwrap":false,"_cnpm_publish_time":1487763227574,"_cnpmcore_publish_time":"2021-12-14T15:39:45.663Z"},"0.13.5":{"name":"tweetnacl-util","version":"0.13.5","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","types":"nacl-util.d.ts","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Unlicense","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"uglify-js":"^2.6.1"},"browser":{"buffer":false},"gitHead":"3369a00dce55cb4768dfcf052259ad104a532233","_id":"tweetnacl-util@0.13.5","_shasum":"e39cd5d99709ee7125a18b03895b45a1299e475f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"e39cd5d99709ee7125a18b03895b45a1299e475f","size":2884,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.13.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.13.5.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/tweetnacl-util-0.13.5.tgz_1481627740921_0.9808623911812901"},"directories":{},"publish_time":1481627741547,"_hasShrinkwrap":false,"_cnpm_publish_time":1481627741547,"_cnpmcore_publish_time":"2021-12-14T15:39:45.877Z"},"0.13.4":{"name":"tweetnacl-util","version":"0.13.4","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","types":"nacl-util.d.ts","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Public domain","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"uglify-js":"^2.6.1"},"browser":{"buffer":false},"gitHead":"5b8d691ecc042a63dd83a83ef02eb83c2b4d9b9f","_id":"tweetnacl-util@0.13.4","_shasum":"fea85ffa5233fdf058b7072762889a7e59676c0c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"fea85ffa5233fdf058b7072762889a7e59676c0c","size":2054,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.13.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.13.4.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tweetnacl-util-0.13.4.tgz_1481241456656_0.45453577232547104"},"directories":{},"publish_time":1481241458559,"_hasShrinkwrap":false,"_cnpm_publish_time":1481241458559,"_cnpmcore_publish_time":"2021-12-14T15:39:46.105Z"},"0.13.3":{"name":"tweetnacl-util","version":"0.13.3","description":"String encoding utilitlies extracted from TweetNaCl.js","main":"nacl-util.js","scripts":{"build":"uglifyjs nacl-util.js -c -m -o nacl-util.min.js"},"repository":{"type":"git","url":"git+https://github.com/dchest/tweetnacl-util-js.git"},"keywords":["base64","utf8","string","encoding"],"author":{"name":"TweetNaCl-js contributors"},"license":"Public domain","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"homepage":"https://github.com/dchest/tweetnacl-util-js","devDependencies":{"uglify-js":"^2.6.1"},"browser":{"buffer":false},"gitHead":"b7102aaf5c1d55118cf9f8dcf489109a1aa7c9fd","_id":"tweetnacl-util@0.13.3","_shasum":"b69428b0c59b9d991f5e2b705d3f1947e8a42594","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"b69428b0c59b9d991f5e2b705d3f1947e8a42594","size":2039,"noattachment":false,"key":"/tweetnacl-util/-/tweetnacl-util-0.13.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tweetnacl-util/download/tweetnacl-util-0.13.3.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/tweetnacl-util-0.13.3.tgz_1455923812967_0.8180637035984546"},"directories":{},"publish_time":1455923815732,"_hasShrinkwrap":false,"_cnpm_publish_time":1455923815732,"_cnpmcore_publish_time":"2021-12-14T15:39:46.328Z"}},"readme":"tweetnacl-util-js\n=================\n\nString encoding utilities extracted from early versions of <https://github.com/dchest/tweetnacl-js>\n\nNotice\n------\n\nEncoding/decoding functions in this package are correct,\nhowever their performance and wide compatibility with uncommon runtimes is not\nsomething that is considered important compared to the simplicity and size of\nimplementation. For example, they don't work under\nReact Native.\n\nInstead of this package, I strongly recommend using my [StableLib](https://github.com/StableLib/stablelib) packages:\n\n* [@stablelib/utf8](https://www.stablelib.com/modules/_utf8_utf8_.html) for UTF-8\n  encoding/decoding (note that the names of operations are reversed compared to\n  this package): `npm install @stablelib/utf8`\n\n* [@stablelib/base64](https://www.stablelib.com/modules/_base64_base64_.html) for\n  constant-time Base64 encoding/decoding: `npm install @stablelib/base64`\n\n\nInstallation\n------------\n\nUse a package manager:\n\n[Bower](http://bower.io):\n\n    $ bower install tweetnacl-util\n\n[NPM](https://www.npmjs.org/):\n\n    $ npm install tweetnacl-util\n\nor [download source code](https://github.com/dchest/tweetnacl-util-js/releases).\n\n\nUsage\n------\n\nTo make keep backward compatibility with code that used `nacl.util` previously\nincluded with TweetNaCl.js, just include it as usual:\n\n```\n<script src=\"nacl.min.js\"></script>\n<script src=\"nacl-util.min.js\"></script>\n<script>\n  // nacl.util functions are now available, e.g.:\n  // nacl.util.decodeUTF8\n</script>\n```\n\nWhen using CommonJS:\n\n```\nvar nacl = require('tweetnacl');\nnacl.util = require('tweetnacl-util');\n```\n\n\nDocumentation\n-------------\n\n#### nacl.util.decodeUTF8(string)\n\nDecodes string and returns `Uint8Array` of bytes.\n\n#### nacl.util.encodeUTF8(array)\n\nEncodes `Uint8Array` or `Array` of bytes into string.\n\n#### nacl.util.decodeBase64(string)\n\nDecodes Base-64 encoded string and returns `Uint8Array` of bytes.\n\n#### nacl.util.encodeBase64(array)\n\nEncodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.\n","_attachments":{},"homepage":"https://github.com/dchest/tweetnacl-util-js","bugs":{"url":"https://github.com/dchest/tweetnacl-util-js/issues"},"license":"Unlicense"}