{"_id":"base32","_rev":"232113","name":"base32","description":"Base32 encoding and decoding","dist-tags":{"latest":"0.0.6"},"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"time":{"modified":"2021-06-03T15:46:57.000Z","created":"2011-02-09T08:51:06.109Z","0.0.6":"2014-02-20T00:48:30.035Z","0.0.5":"2012-08-14T20:05:19.063Z","0.0.3":"2011-02-09T18:45:00.733Z","0.0.2":"2011-02-09T14:26:28.888Z","0.0.1":"2011-02-09T08:51:06.109Z"},"users":{"forbeslindesay":true,"joris-van-der-wel":true,"joakimbeng":true,"kevin-foster":true},"author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"repository":{"type":"git","url":"git://github.com/agnoster/base32-js.git"},"versions":{"0.0.6":{"name":"base32","description":"Base32 encoding and decoding","version":"0.0.6","author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"homepage":"https://github.com/agnoster/base32-js","repository":{"type":"git","url":"git://github.com/agnoster/base32-js.git"},"main":"./lib/base32","bin":{"base32":"./bin/base32.js"},"scripts":{"test":"./node_modules/.bin/coffee test/*-test.coffee"},"engines":{"node":">0.4"},"dependencies":{"optimist":">=0.1.0"},"devDependencies":{"coffee-script":">=1.0.0","vows":">=0.5.6"},"bugs":{"url":"https://github.com/agnoster/base32-js/issues"},"_id":"base32@0.0.6","dist":{"shasum":"79038bcb5aec2d8f22bcc1c28402924f50a6d2ac","size":6650,"noattachment":false,"key":"/base32/-/base32-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/base32/download/base32-0.0.6.tgz"},"_from":".","_npmVersion":"1.3.17","_npmUser":{"name":"agnoster","email":"i@agnoster.net"},"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"directories":{},"publish_time":1392857310035,"_cnpm_publish_time":1392857310035,"_hasShrinkwrap":false},"0.0.5":{"name":"base32","description":"Base32 encoding and decoding","version":"0.0.5","author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"homepage":"https://github.com/agnoster/base32-js","repository":{"type":"git","url":"git://github.com/agnoster/base32-js.git"},"main":"./lib/base32","bin":{"base32":"./bin/base32.js"},"scripts":{"test":"./node_modules/.bin/coffee test/*-test.coffee"},"engines":{"node":">0.4"},"dependencies":{"optimist":">=0.1.0"},"devDependencies":{"coffee-script":">=1.0.0","vows":">=0.5.6"},"_id":"base32@0.0.5","dist":{"shasum":"41b312bd74fa3a123e53e15b5a292a10472f70e3","size":6680,"noattachment":false,"key":"/base32/-/base32-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/base32/download/base32-0.0.5.tgz"},"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"directories":{},"publish_time":1344974719063,"_cnpm_publish_time":1344974719063,"_hasShrinkwrap":false},"0.0.3":{"name":"base32","description":"Base32 encoding and decoding","version":"0.0.3","author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"homepage":"https://github.com/agnoster/base32-js","repository":{"type":"git","url":"git://github.com/agnoster/base32-js.git"},"main":"./lib/base32","directories":{"lib":"./lib","bin":"./bin"},"scripts":{"test":"coffee test/*-test.coffee"},"engines":{"node":"*"},"dependencies":{"optimist":">=0.1.0"},"devDependencies":{"coffee-script":">=1.0.0","vows":">=0.5.6"},"_id":"base32@0.0.3","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.3.8","bin":{"base32":"bin/base32.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"78936a4d69b6cc4377560d1100388f07040aca2d","size":5413,"noattachment":false,"key":"/base32/-/base32-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/base32/download/base32-0.0.3.tgz"},"publish_time":1297277100733,"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"_cnpm_publish_time":1297277100733,"_hasShrinkwrap":false},"0.0.2":{"name":"base32","description":"Base32 encoding and decoding","version":"0.0.2","author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"homepage":"https://github.com/agnoster/base32-js","repository":{"type":"git","url":"git://github.com/agnoster/base32-js.git"},"main":"./lib/base32","directories":{"lib":"./lib","bin":"./bin"},"scripts":{"test":"coffee test/*-test.coffee"},"engines":{"node":"*"},"dependencies":{"optimist":">=0.1.0"},"devDependencies":{"coffee-script":">=1.0.0","vows":">=0.5.6"},"_id":"base32@0.0.2","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.3.8","bin":{"base32":"bin/base32.js"},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"c59012b89f1901fc626a87639bec41cd957dc857","size":4530,"noattachment":false,"key":"/base32/-/base32-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/base32/download/base32-0.0.2.tgz"},"publish_time":1297261588888,"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"_cnpm_publish_time":1297261588888,"_hasShrinkwrap":false},"0.0.1":{"name":"base32","description":"Base32 encoding and decoding, using a variant of Douglas Crockford's Base32","version":"0.0.1","repository":{},"author":{"name":"Isaac Wolkerstorfer","email":"agnoster@gmail.com","url":"http://agnoster.net/"},"main":"lib/base32","directories":{"lib":"lib"},"scripts":{"test":"coffee test/*.coffee"},"engines":{"node":"*"},"devDependencies":{"coffee-script":">=1.0.0","vows":">=0.5.6"},"_id":"base32@0.0.1","_engineSupported":true,"_npmVersion":"0.2.17","_nodeVersion":"v0.3.8","files":[""],"_defaultsLoaded":true,"dist":{"shasum":"484432bb96e7e3616e7c585b2286cb3ea6b162ef","size":3684,"noattachment":false,"key":"/base32/-/base32-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/base32/download/base32-0.0.1.tgz"},"publish_time":1297241466109,"maintainers":[{"name":"agnoster","email":"i@agnoster.net"}],"_cnpm_publish_time":1297241466109,"_hasShrinkwrap":false}},"readme":"# Base 32 encoding/decoding for JavaScript [![build status](https://secure.travis-ci.org/agnoster/base32-js.png?branch=master)](http://travis-ci.org/agnoster/base32-js)\n\nBase 32 is between hexadecimal notation and Base 64 encoding. It's intended to be a **human-friendly** -- you don't have to worry about punctuation, capitalization, or letters/numbers that are easy to confuse, making it easier to transmit in handwriting or over the phone.\n\nOne of the primary purposes is to have aesthetically pleasing SHA1 hashes. Compare:\n\n - Hex: `17O57684bea1f9331418b633a8f373119d765fd4`\n - B64: `xE_ptB5SeclHm8JEsD0-ST1mTBM`\n - B32: `2w2qd15ym7wk650rprtuh4vk26eqcqym`\n\nTry giving out the Base 64 hash over the phone! \"lowercase 'x', capital 'E', underscore, lowercase 'p', ...\" Base 32 will work the same with upper- or lowercase, you can mistake a number for a similar-looking letter, and it will *still* decode to the same data.\n\n## Getting started\n\nIn your shell, install with npm:\n\n```sh\nnpm install base32\n```\n\nIn your code:\n\n```javascript\nvar base32 = require('base32')\n\n// simple api\n\nvar encoded = base32.encode('some data to encode')\nvar decoded = base32.decode(encoded)\n\n// streaming api\nthis.encoder = new Base32.encoder()\nthis.dataCallback = function(chunk) {\n    this.emit(this.encoder(chunk))\n}\nthis.closeCallback = function(chunk) {\n    this.emit(this.finish()) // flush any remaining bits\n}\n\n// easy sha1 hash\nvar hash = base32.sha1(some_data_to_hash) // DONE.\n```\n\nOn the command-line (to install system-wide, use `npm install -g base32`):\n\n```sh\nbase32 -h\n#> Usage: base32 [input_file] [-o output_file] [-d|--decode] [-s|--sha]\necho \"Hello World\" | base32\n#> 91jprv3f41bpywkccg50\necho 'axqqeb10d5u20wk5c5p6ry90exqq4uvk44' | base32 -d\n#> Wow, it really works!\nbase32 -s test/*\n#> ky2t1raumjn9cghne773petngx3zz3q7  test/base32-test.coffee\n#> 6b4bkjaveddmg5jh7hnyw132yht20g6e  test/compare.coffee\n```\n\n## Warning: this is *a* Base 32 implementation, not *the* Base 32 implementation\n\nThere are about (128 choose 32) different specifications of something called \"Base 32\" - see [Wikipedia](http://en.wikipedia.org/wiki/Base_32) for some of them.\n\nThis is just one that should be simple, less error-prone, and streamable (for [Node](http://nodejs.org)).\n\n## Minispec\n\n- The *encoding* alphabet consists of the numerals 0-9 and the letters a-z, excluding a few letters that might look like numbers, which we simply interpret as follows:\n\n  - I -> 1\n  - L -> 1\n  - O -> 0\n  - S -> 5\n\n- When *decoding*, capital letters are converted to lowercase and the \"ambiguous\" letters mentioned above converted to their numeric counterparts.\n- Each character corresponds to 5 bits of input.\n- Lexicographic order of strings is preserved through Base 32 encoding.\n\n## Formalia\n\nUnder MIT License.\n\nFork as much as you like, I'm more than amenable to pull requests. I'm trying to keep it reasonably node-ish, so bear that in mind.\n","_attachments":{},"homepage":"https://github.com/agnoster/base32-js","bugs":{"url":"https://github.com/agnoster/base32-js/issues"}}