{"_id":"base32-encoding","_rev":"2-9205743ae5d5b2c9dd1d484a372d0f12","name":"base32-encoding","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"base32-encoding","version":"1.0.0","description":"Encode / decode base32. Supports Buffers, strings, custom alphabets, abstract-encoding compliant","main":"index.js","dependencies":{},"devDependencies":{},"scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/emilbayes/base32-encoding.git"},"keywords":["base32","base256","abstract","encoding","decoding","buffer","string","parse"],"author":{"name":"Emil Bay","email":"github@tixz.dk"},"license":"ISC","bugs":{"url":"https://github.com/emilbayes/base32-encoding/issues"},"homepage":"https://github.com/emilbayes/base32-encoding#readme","gitHead":"2060660ee9a227794cb7f715a96e7c422a5b8d46","_id":"base32-encoding@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"dist":{"integrity":"sha512-k1gA7f00ODLY7YtuEQFz0Kn3huTCmL/JW+oQtw51ID+zxs5chj/YQ1bXN+Q0JsqiKB2Yn0oA0AA8uipFYgpagQ==","shasum":"3f46a6adb4d6b7e5cf0f294392c1f9ec600da27b","tarball":"https://registry.npmjs.org/base32-encoding/-/base32-encoding-1.0.0.tgz","fileCount":5,"unpackedSize":7233,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGBojWUjg0gG08vRpZTDHKfyoWd6fDr0pMF2QILVhXBwIhAKJgnh8cj6R6SfcD5RQ2PZphvoxsbkl9vNXOFz6ukupu"}]},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/base32-encoding_1.0.0_1518282677393_0.05595022113726644"},"_hasShrinkwrap":false}},"time":{"created":"2018-02-10T17:11:17.393Z","1.0.0":"2018-02-10T17:11:18.088Z","modified":"2022-04-11T17:05:19.998Z"},"maintainers":[{"name":"emilbayes","email":"github@tixz.dk"}],"description":"Encode / decode base32. Supports Buffers, strings, custom alphabets, abstract-encoding compliant","homepage":"https://github.com/emilbayes/base32-encoding#readme","keywords":["base32","base256","abstract","encoding","decoding","buffer","string","parse"],"repository":{"type":"git","url":"git+https://github.com/emilbayes/base32-encoding.git"},"author":{"name":"Emil Bay","email":"github@tixz.dk"},"bugs":{"url":"https://github.com/emilbayes/base32-encoding/issues"},"license":"ISC","readme":"# `base32-encoding `\n\n> Encode / decode base32. Supports Buffers, strings, custom alphabets, abstract-encoding compliant\n\n## Usage\n\n```js\nvar base32 = require('base32-encoding')\n\nvar buf = crypto.randomBytes(32)\n\nvar b32 = base32.encode(buf)\nvar b256 = base32.decode(b32)\n\nvar str = base32.stringify(buf) // base32.encode then convert to string\nvar origBuf = base32.parse(str) // convert from string then base32.decode\n```\n\n## API\n\n### `var output = base32.encode(buf, [output], [offset])`\n\nEncode a normal `Buffer` as base32, meaning only the lower 5 bits are used.\nTakes `⌈len * 8 / 5⌉` bytes to encode. Takes optional `Buffer` `output` instead\nof allocating a new `Buffer` internally, and writes at optional `offset`.\nReturns `output`. Sets `base32.encode.bytes` to the number of bytes written.\n\n### `var output = base32.decode(buf, [output], [offset])`\n\nDecode a base32 `Buffer` as a normal, \"base256\" `Buffer`, meaning only the lower\n5 bits are read from `buf` and assembled into complete 8 bit bytes.\nTakes `⌊len * 5 / 8⌋` bytes to encode. Takes optional `Buffer` `output` instead\nof allocating a new `Buffer` internally, and writes at optional `offset`.\nReturns `output`. Sets `base32.decode.bytes` to the number of bytes written.\n\n### `var len = base32.encodingLength(buf)`\n\nReturns `⌈len * 8 / 5⌉`.\n\n### `var str = base32.stringify(buf, [alphabet])`\n\nEncode `buf` to base32 and translate into a string using optional `alphabet`.\n`alphabet` defaults to `23456789abcdefghijkmnpqrstuvwxyz` (missing `o01l`).\n\n### `var buf = base32.parse(str, [alphabet])`\n\nDecode `str` from base32 and translate from a string using optional `alphabet`.\n`alphabet` defaults to `23456789abcdefghijkmnpqrstuvwxyz` (missing `o01l`).\n\n## Install\n\n```sh\nnpm install base32-encoding\n```\n\n## License\n\n[ISC](LICENSE)\n","readmeFilename":"README.md"}