{"id":15008627,"url":"https://github.com/daegalus/dart-base32","last_synced_at":"2025-06-29T16:37:41.609Z","repository":{"id":5315827,"uuid":"6498221","full_name":"daegalus/dart-base32","owner":"daegalus","description":"Base32 Encoder and Decoder for Dart","archived":false,"fork":false,"pushed_at":"2022-06-14T08:20:16.000Z","size":257,"stargazers_count":8,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-03T05:06:34.606Z","etag":null,"topics":["base32","dart","dartlang","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"TheWhisp/android_kernel_samsung_msm8916-caf","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daegalus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"yulian","custom":["http://paypal.me/yuliank","https://cash.app/$yulian","https://www.venmo.com/yuliank"]}},"created_at":"2012-11-01T22:46:08.000Z","updated_at":"2023-03-28T03:12:50.000Z","dependencies_parsed_at":"2022-07-08T02:52:56.012Z","dependency_job_id":null,"html_url":"https://github.com/daegalus/dart-base32","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/daegalus/dart-base32","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daegalus%2Fdart-base32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daegalus%2Fdart-base32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daegalus%2Fdart-base32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daegalus%2Fdart-base32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daegalus","download_url":"https://codeload.github.com/daegalus/dart-base32/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daegalus%2Fdart-base32/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262628046,"owners_count":23339717,"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":["base32","dart","dartlang","hacktoberfest"],"created_at":"2024-09-24T19:19:46.035Z","updated_at":"2025-06-29T16:37:41.576Z","avatar_url":"https://github.com/daegalus.png","language":"Dart","funding_links":["https://ko-fi.com/yulian","http://paypal.me/yuliank","https://cash.app/$yulian","https://www.venmo.com/yuliank"],"categories":[],"sub_categories":[],"readme":"[![Dart](https://github.com/Daegalus/dart-base32/workflows/Dart/badge.svg)](https://github.com/Daegalus/dart-base32/actions)\n\n# dart-base32\n\nSimple base32 encode/decode following RFC4648. Can handle base32 for OTP secrets also.\n\nFeatures:\n\n* Encodes and Decodes Base32 strings.\n* [Documentation](https://daegalus.github.io/dart-base32/)\n\n## Getting Started\n\n### Pubspec\n\npub.dev: (you can use 'any' instead of a version if you just want the latest always)\n\n```yaml\ndependencies:\n  base32: 2.1.3\n```\n\n```dart\nimport 'package:base32/base32.dart';\n```\n\nStart encoding/decoding ...\n\n```dart\n// Encode a hex string to base32\nbase32.encodeHexString('48656c6c6f21deadbeef'); // -\u003e 'JBSWY3DPEHPK3PXP'\n\n// base32 decoding to original string.\nbase32.decodeAsHexString(\"JBSWY3DPEHPK3PXP\"); // -\u003e '48656c6c6f21deadbeef'\n```\n\n## API\n\n### `base32.encode(List\u003cint\u003e byteList, {Encoding encoding = Encoding.standardRFC4648})`\n\nGenerate and return a RFC4648 base32 string from a list of bytes.\n\n* `byteList` - (`List\u003cint\u003e`) A list of bytes representing your input.\n\nReturns `String` representation of the encoded base32.\n\n### `base32.encodeHexString(String hex, {Encoding encoding = Encoding.standardRFC4648})`\n\nGenerate and return a RFC4648 base32 string from a hex string.\n\n* `hexString` - (`String`) A string of hex values intended to be converted to bytes and encoded.\n\nReturns `String` representation of the encoded base32\n\nExample: Encode a hex string.\n\n```dart\nbase32.encodeHexString('48656c6c6f21deadbeef'); // -\u003e 'JBSWY3DPEHPK3PXP'\n```\n\n### `base32.encodeString(String base32str, {Encoding encoding = Encoding.standardRFC4648})`\n\nGenerate and return a RFC4648 base32 string from a plain string.\n\n* `base32str` - (`String`) A string intended to be converted to bytes and encoded.\n\nReturns `String` representation of the encoded base32\n\nExample: Encode a hex string.\n\n```dart\nbase32.encodeString('foobar'); // -\u003e 'MZXW6YTBOI======'\n```\n\n### `base32.decode(String base32, {Encoding encoding = Encoding.standardRFC4648})`\n\nDecodes a base32 string back to its original byte values.\n\n* `base32` - (`String`) The base32 string you wish to decode.\n\nReturns `Uint8List` of the decoded data.\n\nExample: Decode a base32 string, then output it in hex format\n\n```dart\nimport \"package:convert/convert.dart\"\nvar decoded = base32.decode(\"JBSWY3DPEHPK3PXP\");\nvar decodedHex = hex.encode(decoded); // -\u003e '48656c6c6f21deadbeef'\n```\n\n### `base32.decodeAsHexString(String base32, {Encoding encoding = Encoding.standardRFC4648})`\n\nDecodes a base32 string back to its original byte values in hex string format.\n\n* `base32` - (`String`) The base32 string you wish to decode.\n\nReturns `String` of the decoded data.\n\nExample: Decode a base32 string to a hex string.\n\n```dart\nimport \"package:convert/convert.dart\"\nvar decoded = base32.decodeAsHexString(\"JBSWY3DPEHPK3PXP\"); // -\u003e '48656c6c6f21deadbeef'\n```\n\n### `base32.decodeAsString(String base32, {Encoding encoding = Encoding.standardRFC4648})`\n\nDecodes a base32 string back to its original byte values.\n\n* `base32` - (`String`) The base32 string you wish to decode.\n\nReturns `String` of the decoded data.\n\nExample: Decode a base32 string to a string.\n\n```dart\nvar decoded = base32.decodeAsString(\"MZXW6YTBOI======\"); // -\u003e 'foobar'\n```\n\n### `enum Encoding`\n\nThis is a list of supported variants and their different encodings.\n\n- StandardRFC4648 - the default standard encoding\n  - `ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`\n  - Padded with `=`\n- base32Hex\n  - `0123456789ABCDEFGHIJKLMNOPQRSTUV`\n  - Padded with `=`\n- crockford\n  - `0123456789ABCDEFGHJKMNPQRSTVWXYZ`\n  - Not Padded\n- z-base-32\n  - `ybndrfg8ejkmcpqxot1uwisza345h769`\n  - Not Padded\n- geohash\n  - `0123456789bcdefghjkmnpqrstuvwxyz`\n  - Padded with `=`\n- NonStandardRFC4648 - Same as StandardRFC4648, but lowercase, not supported by the spec.\n  - `abcdefghijklmnopqrstuvwxyz234567`\n  - Padded with `=`\n  \n## Testing\n\n```bash\ndart test/base32_test.dart\n```\n\n## Changelog\n\nSee CHANGELOG.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaegalus%2Fdart-base32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaegalus%2Fdart-base32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaegalus%2Fdart-base32/lists"}