Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Nov 10, 2019
1 parent cfd2bcb commit ccc39f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ use Selective\XmlDSig\DigestAlgorithmType;
use Selective\XmlDSig\XmlSigner;

$xmlSigner = new XmlSigner();

$xmlSigner->loadPfxFile('filename.pfx', 'password');

// or load a PEM file
//$xmlSigner->loadPrivateKeyFile('filename.pem', 'password');

// Optional: Set reference URI
$xmlSigner->setReferenceUri('');

Expand Down Expand Up @@ -85,7 +89,13 @@ Output file: signed-example.xml
use Selective\XmlDSig\XmlSignatureValidator;

$signatureValidator = new XmlSignatureValidator();
$signatureValidator->loadPfx('filename.pfx', 'password');

// Load a PFX file
$signatureValidator->loadPfxFile('filename.pfx', 'password');

// or load just a public key file
//$signatureValidator->loadPublicKeyFile('cacert.pem', 'password');

$isValid = $signatureValidator->verifyXmlFile('signed-example.xml');

if ($isValid) {
Expand All @@ -95,7 +105,7 @@ if ($isValid) {
}
```

### Online XML Digital Signature Verifer
### Online XML Digital Signature Verifier

Try these excellent online tools to verify XML signatures:

Expand Down
2 changes: 1 addition & 1 deletion src/XmlSignatureValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function loadPfxFile(string $filename, string $password): bool
/**
* Read and load the public key file.
*
* @param string $filename the public key file
* @param string $filename The public key file
*
* @throws XmlSignatureValidatorException
*
Expand Down

0 comments on commit ccc39f2

Please sign in to comment.