Skip to content

ikeeip/phppassholderclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

phppassholderclient

For the latest source code, see https://github.com/ikeeip/phppassholderclient

PHP client for passholder

Example

<?php

require_once 'passholder.php';

$serviceUrl = 'ssl://localhost:8123';
$clientPemFilePath = 'keys/client.pem';
$caCertFilePath = 'keys/ca-cert.pem';

$testPass = 'mysecurepass';

$passHolder = new PassHolder($serviceUrl, $clientPemFilePath);
$passHolder->setRootCertificationAuthority($caCertFilePath);
$passHolder->connect();

$hash = $passHolder->hold($testPass);
echo ">>> " . $hash . "\n";

$pass = $passHolder->unhold($hash);
echo ">>> " . $pass . "\n";

$ret = $passHolder->remove($hash);
echo ">>> " . $ret . "\n";

$pass = $passHolder->unhold($hash); # Exception will be raised here
echo ">>> " . $pass . "\n";

$passHolder->disconnect();

About

passholder client for php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages