|
|
5 년 전 | |
|---|---|---|
| .. | ||
| .github | 5 년 전 | |
| src | 5 년 전 | |
| test | 5 년 전 | |
| .gitignore | 5 년 전 | |
| CONTRIBUTING.md | 5 년 전 | |
| LICENSE | 5 년 전 | |
| README.md | 5 년 전 | |
| composer.json | 5 년 전 | |
| composer.lock | 5 년 전 | |
| infection.json.dist | 5 년 전 | |
| phpcs.xml.dist | 5 년 전 | |
| phpunit.xml.dist | 5 년 전 | |
| psalm.xml.dist | 5 년 전 | |
Sign and validate signed files made easy.
Note: this is not a cryptographic signing library.
The suggested installation method is via composer:
$ composer require roave/signature
// 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'));
// 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'));