{"id":17587007,"url":"https://github.com/softcreatr/wsc-crypto-php","last_synced_at":"2026-01-24T03:03:45.324Z","repository":{"id":257821638,"uuid":"871124062","full_name":"SoftCreatR/wsc-crypto-php","owner":"SoftCreatR","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-11T12:25:12.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T03:13:58.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SoftCreatR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"softcreatr","custom":["https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4"]}},"created_at":"2024-10-11T10:14:31.000Z","updated_at":"2024-10-12T14:37:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"2699c232-965c-48cd-9c50-64ec7a634c73","html_url":"https://github.com/SoftCreatR/wsc-crypto-php","commit_stats":null,"previous_names":["softcreatr/wsc-crypto-php"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftCreatR%2Fwsc-crypto-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftCreatR%2Fwsc-crypto-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftCreatR%2Fwsc-crypto-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SoftCreatR%2Fwsc-crypto-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SoftCreatR","download_url":"https://codeload.github.com/SoftCreatR/wsc-crypto-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657922,"owners_count":21140846,"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-10-22T03:43:07.188Z","updated_at":"2026-01-24T03:03:45.273Z","avatar_url":"https://github.com/SoftCreatR.png","language":"PHP","funding_links":["https://github.com/sponsors/softcreatr","https://ecologi.com/softcreatr?r=61212ab3fc69b8eb8a2014f4"],"categories":[],"sub_categories":[],"readme":"# wsc-crypto-php\n\nPoC of cryptographic utility functions for WoltLab Suite Core, implemented in PHP.\n\n## Overview\n\nThis project provides cryptographic helper functions, including:\n\n- **Creating secure signatures** based on the Keyed-Hash Message Authentication Code (HMAC) algorithm.\n- **Base64 encoding and decoding** without cache-timing leaks.\n- **Parsing and verifying signed strings** to ensure data integrity and authenticity.\n\n## Installation\n\nUse Composer to install the package:\n\n```bash\ncomposer require softcreatr/wsc-crypto-php\n```\n\n## Usage\n\nFor detailed usage examples, please refer to the [examples](./examples/) directory.\n\n### Examples\n\n- [Creating and Verifying a Signed String](./examples/createAndVerifySignedString.php)\n- [Handling a Session Cookie](./examples/handleSessionCookie.php)\n- [Parsing a Signed String Directly](./examples/parseSignedString.php)\n\n## Testing\n\nThe project includes a comprehensive test suite using PHPUnit.\n\n### Running Tests\n\n1. **Install Dependencies:**\n\n   Ensure all dependencies are installed via Composer:\n\n    ```bash\n    composer install\n    ```\n\n2. **Run PHPUnit with Coverage:**\n\n   Execute the following command to run your tests and generate an HTML coverage report:\n\n    ```bash\n    ./vendor/bin/phpunit --coverage-html coverage\n    ```\n\n3. **View Coverage Report:**\n\n   Open `coverage/index.html` in your browser to view detailed coverage statistics.\n\n## License\n\nThis project is licensed under the [ISC License](https://github.com/SoftCreatR/wsc-crypto-php/blob/main/LICENSE.md). See the [LICENSE](https://github.com/SoftCreatR/wsc-crypto-php/blob/main/LICENSE.md) file for details.\n\n## Author\n\n- **Sascha Greuel**\n- **Email:** [hello@1-2.dev](mailto:hello@1-2.dev)\n- **GitHub:** [SoftCreatR](https://github.com/SoftCreatR)\n\n## Security Considerations\n\n- **Protect the `signatureSecret`:** Ensure that the signature secret is stored securely and not exposed in version control or logs.\n- **Validate Inputs:** Always validate and sanitize inputs when dealing with signed strings to prevent security vulnerabilities.\n\n## Contributing\n\nContributions are welcome! Please open issues or submit pull requests for improvements and bug fixes.\n\n## Acknowledgments\n\n- [ParagonIE](https://github.com/paragonie) for their constant-time encoding library.\n- Inspired by WoltLab's WCF Crypto utilities.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftcreatr%2Fwsc-crypto-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftcreatr%2Fwsc-crypto-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftcreatr%2Fwsc-crypto-php/lists"}