{"id":21548434,"url":"https://github.com/beeven/node-b32","last_synced_at":"2025-10-26T13:40:56.983Z","repository":{"id":21496923,"uuid":"24815845","full_name":"beeven/node-b32","owner":"beeven","description":"Implementation of RFC-3548 Base32 encoding/decoding for node using C. It's binary safe for using Buffer.","archived":false,"fork":false,"pushed_at":"2016-01-16T14:00:56.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T09:28:47.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-05T13:06:11.000Z","updated_at":"2017-10-04T15:53:54.000Z","dependencies_parsed_at":"2022-08-21T14:40:58.701Z","dependency_job_id":null,"html_url":"https://github.com/beeven/node-b32","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeven%2Fnode-b32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeven%2Fnode-b32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeven%2Fnode-b32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeven%2Fnode-b32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeven","download_url":"https://codeload.github.com/beeven/node-b32/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141576,"owners_count":20404835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T06:18:37.666Z","updated_at":"2025-10-26T13:40:56.916Z","avatar_url":"https://github.com/beeven.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"b32\n========\n\n[![Build Status](https://travis-ci.org/beeven/node-b32.svg?branch=master)](https://travis-ci.org/beeven/node-b32)\n[![Dependencies](https://david-dm.org/beeven/node-b32.svg)](https://david-dm.org/beeven/node-b32)\n\nImplementation of RFC-3548 Base32 encoding/decoding for node using C (suppose to be faster than pure javascript).\n\nFeatures\n----------\n- Implemented in C\n- Sync \u0026 Async methods support\n- Options to add '=' paddings\n- Promises chaining support (Thanks to q)\n\nInstallation\n-------------\n```bash\nnpm install b32\n```\n\nTest\n-----------------\n```bash\nnpm test\n```\n\nUsage\n-----------------\n```javascript\nvar b32 = require(\"b32\");\n// Encode a string and use callback to pick up the result\nb32.encode('foo',function(err,result){\n    console.log(result.toString());\n});\n\n// Encode a buffer and use promises\nb32.encode(new Buffer('foo\\x00'),{padding:true})\n    .then(function(encoded_result){\n        console.log(encoded_result.toString());\n        return b32.decode(encoded_result);\n    })\n    .then(function(decoded_result){\n        console.log(decoded_result);\n    });\n\n// Decode a string in synchronize mode\nvar decoded = b32.decodeSync('MZXW6===');\n\n// Decode a buffer with async function\nb32.decode(new Buffer('MZXW6')).\n    .then(function(result){\n        console.log(result);\n    });\n\n```\n\n\n\n\nFunctions\n-------------\n### encodeSync(Buffer[,options])\noptions:\n - padding: Boolean (default: false) add '=' padding to the end\nReturns:\n Encoded base32 string in buffer\n\n### decodeSync(Buffer)\nReturns:\n Decoded binary buffer\n\n### encode(Buffer,[options],[callback])\noptions:\n  - same as sync function\ncallback: a function with signature function(err,result)\nReturns:\n    A promise which will resolve with the result\n\n### decode(Buffer,[callback])\ncallback: a function with signature function(err,result)\nReturns:\n    A promise which will resolve with the result\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeven%2Fnode-b32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeven%2Fnode-b32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeven%2Fnode-b32/lists"}