{"id":20217568,"url":"https://github.com/pforret/digestif","last_synced_at":"2026-04-16T17:43:17.316Z","repository":{"id":161625070,"uuid":"636299439","full_name":"pforret/digestif","owner":"pforret","description":"Digestif helps you create unique unguessable URLs (PHP)","archived":false,"fork":false,"pushed_at":"2025-06-16T10:38:37.000Z","size":421,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-16T06:11:47.058Z","etag":null,"topics":["laravel","php","security"],"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/pforret.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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,"zenodo":null},"funding":{"github":"pforret"}},"created_at":"2023-05-04T14:34:12.000Z","updated_at":"2025-05-12T09:30:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4045013-9c45-4efa-9321-c8414066cb47","html_url":"https://github.com/pforret/digestif","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"spatie/package-skeleton-php","purl":"pkg:github/pforret/digestif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fdigestif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fdigestif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fdigestif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fdigestif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pforret","download_url":"https://codeload.github.com/pforret/digestif/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pforret%2Fdigestif/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268495878,"owners_count":24259395,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["laravel","php","security"],"created_at":"2024-11-14T06:34:38.667Z","updated_at":"2026-04-16T17:43:12.295Z","avatar_url":"https://github.com/pforret.png","language":"PHP","funding_links":["https://github.com/sponsors/pforret"],"categories":[],"sub_categories":[],"readme":"# Digestif helps you create unique unguessable URLs\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/pforret/digestif.svg?style=flat-square)](https://packagist.org/packages/pforret/digestif)\n[![Tests](https://img.shields.io/github/actions/workflow/status/pforret/digestif/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/pforret/digestif/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/pforret/digestif.svg?style=flat-square)](https://packagist.org/packages/pforret/digestif)\n\n![](assets/unsplash.digestif.jpg)\n\nPackage to create a digest of a string/array, to be used in creating unique unguessable URLs/folder names.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require pforret/digestif\n```\n\n## Usage\n\n```php\nuse Pforret\\Digestif\\Digestif;\n\n$dig = new Digestif(env(\"DIGEST_SEED\"));\n// seed value should be unique for that server/application.\n// It's important that it is not known to the outside world.\n// It should be the same for the application creating the Digest as the one reading/verifying it \n\n$url = \"https://secure.example.com/invoice/1200323\";\n// if you make your URL like this, the URL for the other invoices can be guessed (e.g. 1200324, etc)\n\n$digest = $dig-\u003efromString($url);\n$secure_url = \"$url/$digest\";\n// URL = https://secure.example.com/invoice/1200323/0a1b-2c3d\n// using a route /invoice/{id}/{digest} will allow you to verify the digest\n// the URL of the next invoice 1200324 cannot be guessed without knowing the seed value\n\n// or use this\n$secure_url = \"$url?$digest\";\n//URL = https://secure.example.com/invoice/1200323?0a1b-2c3d\n// and then verify the digest before showing the actual invoice\nif(!$dig-\u003ecompareDigest($dig-\u003efromString($url), $digest)){\n    return false;\n}\n// 0a1b-2c3d will be ok, as 0a1b2c3d (without dash)\n``` \n\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Peter Forret](https://github.com/pforret)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fdigestif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpforret%2Fdigestif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpforret%2Fdigestif/lists"}