{"id":22717938,"url":"https://github.com/carry0987/cony","last_synced_at":"2026-01-03T04:03:50.683Z","repository":{"id":199636052,"uuid":"703386848","full_name":"carry0987/Cony","owner":"carry0987","description":"Cony is a PHP library for convert integer into alphabet, and reversely too","archived":false,"fork":false,"pushed_at":"2024-07-21T13:58:03.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T13:03:33.613Z","etag":null,"topics":["bcmath","composer","converter","hash","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/carry0987.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-11T06:37:08.000Z","updated_at":"2024-07-21T13:57:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f52ccbe7-d9d2-478b-9146-d57c0e70c524","html_url":"https://github.com/carry0987/Cony","commit_stats":null,"previous_names":["carry0987/cony"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FCony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FCony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FCony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carry0987%2FCony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carry0987","download_url":"https://codeload.github.com/carry0987/Cony/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639557,"owners_count":20323511,"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":["bcmath","composer","converter","hash","php"],"created_at":"2024-12-10T14:11:09.673Z","updated_at":"2026-01-03T04:03:45.653Z","avatar_url":"https://github.com/carry0987.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cony\n[![Packgist](https://img.shields.io/packagist/v/carry0987/cony.svg?style=flat-square)](https://packagist.org/packages/carry0987/cony)  \nCony is a PHP library for convert integer into alphabet, and reversely too\n\n## Installation\n```bash\ncomposer require carry0987/cony\n```\n\u003e **Note** You can install [`bcmath`](https://secure.php.net/manual/en/book.bc.php) extension in order to get better performance\n\n## Usage\n```php\nrequire dirname(__DIR__).'/vendor/autoload.php';\n\nuse carry0987\\Cony\\Cony;\n\necho Cony::toNumeric('test'); // 4544743\necho '\u003cbr /\u003e';\necho Cony::toAlphanumeric(4544743); // test\n```\n\nIf you want the alphaID to be at least 3 letter long, use the `$padUp` argument.\n\u003e In most cases this is better than totally random ID generators because this can easily avoid duplicate ID's.\n\u003e\n\u003e For example if you correlate the alpha ID to an auto incrementing ID in your database, you're done.\n```php\nCony::toAlphanumeric(4540899, 3); // test\nCony::toNumeric('test', 3); // 4540899\n```\n\nAlthough this function's purpose is to just make the ID short - and not so much secure, with third argument `secureKey` you can optionally supply a password to make it harder to calculate the corresponding numeric ID.\n```php\nCony::toAlphanumeric(11282993, 3, 'heuh2ui12'); // test\nCony::toNumeric('test', 3, 'heuh2ui12'); // 11282993\n```\n\nAnd, for final, you can easy transform alphanumeric result:\n```php\nCony::toAlphanumeric(21663528, 0, null, Cony::TRANSFORM_UPPERCASE); // B2TFK\nCony::toAlphanumeric(21663528, 0, null, Cony::TRANSFORM_LOWERCASE); // b2tfk\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarry0987%2Fcony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarry0987%2Fcony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarry0987%2Fcony/lists"}