{"id":16619069,"url":"https://github.com/jasny/base58-php-ext","last_synced_at":"2025-10-29T19:31:58.885Z","repository":{"id":44806493,"uuid":"133414934","full_name":"jasny/base58-php-ext","owner":"jasny","description":"PHP extension for base58 encoding and decoding using the Bitcoin alphabet","archived":false,"fork":false,"pushed_at":"2023-07-17T00:26:53.000Z","size":100,"stargazers_count":17,"open_issues_count":3,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-06T21:55:27.232Z","etag":null,"topics":["base58","bitcoin","pecl","php-extension","php7"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/jasny.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,"governance":null}},"created_at":"2018-05-14T20:02:34.000Z","updated_at":"2025-01-02T18:36:34.000Z","dependencies_parsed_at":"2023-07-17T01:38:49.207Z","dependency_job_id":null,"html_url":"https://github.com/jasny/base58-php-ext","commit_stats":null,"previous_names":["jasny/base58-php-ext"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasny%2Fbase58-php-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasny%2Fbase58-php-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasny%2Fbase58-php-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasny%2Fbase58-php-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasny","download_url":"https://codeload.github.com/jasny/base58-php-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238882528,"owners_count":19546534,"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":["base58","bitcoin","pecl","php-extension","php7"],"created_at":"2024-10-12T02:22:39.947Z","updated_at":"2025-10-29T19:31:53.576Z","avatar_url":"https://github.com/jasny.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![improved PHP library](https://user-images.githubusercontent.com/100821/46372249-e5eb7500-c68a-11e8-801a-2ee57da3e5e3.png)\n\n# Base58 PHP extension\n\n[![Build Status](https://api.travis-ci.org/jasny/base58-php-ext.svg?branch=master)](https://travis-ci.org/jasny/base58-php-ext)\n[![Build status](https://ci.appveyor.com/api/projects/status/7rof1vr8mv4kam17/branch/master?svg=true)](https://ci.appveyor.com/project/jasny/base58-php-ext/branch/master)\n\nPHP extension for base58 encoding and decoding using the Bitcoin alphabet.\n\nUsing this extension is about 100 times faster than using userspace functions.\n\n## Requirements\n\n* PHP 7.x or 8.x\n\n## Installation\n\nThe extension is [available from pecl](https://pecl.php.net/package/base58).\n\n    pecl install base58-beta\n\n### Manual build\n\nInstead of installing this extension from pecl, you can build it manually\n\n    phpize\n    ./configure --with-base58\n    make\n    make install\n\nAdd the following line to your `php.ini`\n\n    extension=base58.so\n\n## Functions\n\n### base58_encode\n\nBase58 encode a string.\n\n    string base58_encode(string $data)\n\nTriggers an `E_WARNING` and returns `false` if string can't be encoded.\n\n### base58_encode\n\nDecode a base58 encoded string.\n\n    string base58_decode(string $data)\n\nTriggers an `E_WARNING` and returns `false` if string can't be decoded.\n\n## Caveat\n\nTo encode a hash, make sure you're using the raw hash and not a hexidecimal string.\n\n    $rawHash = hash('sha256', 'some string', true); // The `true` makes the function return a raw hash\n    $encodedHash = base58_encode($rawHash);\n\n\n## Benchmark\n\nThe extension is run in test `Base58ExtEvent`. The `Base58BCMathEvent` and `Base58GMPEvent` tests use\nthe `StephenHill\\Base58` PHP library.\n\n```\nStephenHill\\Benchmarks\\Base16Event\n    Method Name    Iterations    Average Time      Ops/second\n    ------------  ------------  --------------    -------------\n    encodeBase16: [10,000    ] [0.0000001919985] [5,208,374.51881]\n    decodeBase16: [10,000    ] [0.0000004031897] [2,480,222.34049]\n\n\nStephenHill\\Benchmarks\\Base58BCMathEvent\n    Method Name    Iterations    Average Time      Ops/second\n    ------------  ------------  --------------    -------------\n    encodeBase58: [10,000    ] [0.0000484058857] [20,658.64482]\n    decodeBase58: [10,000    ] [0.0000523419857] [19,105.12157]\n\n\nStephenHill\\Benchmarks\\Base58ExtEvent\n    Method Name    Iterations    Average Time      Ops/second\n    ------------  ------------  --------------    -------------\n    encodeBase58: [10,000    ] [0.0000003235340] [3,090,865.14370]\n    decodeBase58: [10,000    ] [0.0000003539085] [2,825,588.79008]\n\n\nStephenHill\\Benchmarks\\Base58GMPEvent\n    Method Name    Iterations    Average Time      Ops/second\n    ------------  ------------  --------------    -------------\n    encodeBase58: [10,000    ] [0.0000255326509] [39,165.53757]\n    decodeBase58: [10,000    ] [0.0000418104410] [23,917.47075]\n\n\nStephenHill\\Benchmarks\\Base64Event\n    Method Name    Iterations    Average Time      Ops/second\n    ------------  ------------  --------------    -------------\n    encodeBase64: [10,000    ] [0.0000003066778] [3,260,750.99122]\n    decodeBase64: [10,000    ] [0.0000003187656] [3,137,100.97233]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasny%2Fbase58-php-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasny%2Fbase58-php-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasny%2Fbase58-php-ext/lists"}