Sign and verify stuff

1.0.0 2017-02-17 13:53 UTC

This package is auto-updated.

Last update: 2020-08-06 00:01:20 UTC


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

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