roave / signature
Sign and verify stuff
Installs: 8 312 597
Dependents: 2
Suggesters: 0
Security: 0
Stars: 43
Watchers: 10
Forks: 3
Open Issues: 7
Requires
- php: ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
Requires (Dev)
- doctrine/coding-standard: ^12.0.0
- infection/infection: ^0.26.19
- phpunit/phpunit: ^9.6.7
- vimeo/psalm: ^5.9.0
- 1.9.x-dev
- 1.8.x-dev
- 1.8.0
- 1.7.x-dev
- 1.7.0
- 1.6.x-dev
- 1.6.0
- 1.5.x-dev
- 1.5.0
- 1.4.x-dev
- 1.4.0
- 1.3.x-dev
- 1.3.0
- 1.2.x-dev
- 1.2.0
- 1.1.x-dev
- 1.1.0
- 1.0.0
- dev-renovate/all-minor-patch
- dev-renovate/phpunit-phpunit-11.x
- dev-renovate/lock-file-maintenance
- dev-renovate/actions-checkout-4.x
- dev-renovate/phpunit-phpunit-10.x
This package is auto-updated.
Last update: 2024-11-21 18:45:57 UTC
README
Sign and validate signed files made easy.
Note: this is not a cryptographic signing library.
Installation
The suggested installation method is via composer:
$ composer require roave/signature
Usage examples
Signing a file
// Creating a signer $signer = new \Roave\Signature\FileContentSigner( new \Roave\Signature\Encoder\Sha1SumEncoder() ); // It'll give you a signature to the provided code content $signature = $signer->sign(file_get_contents('/var/tmp/file.php'));
Validating a signed file
// Creating a signer checker $signer = new \Roave\Signature\FileContentChecker( new \Roave\Signature\Encoder\Sha1SumEncoder() ); // It'll validate the signature on file content $signer->check(file_get_contents('/var/tmp/signed-file.php'));