Connection library for the Townsend AKM.

v1.0.0 2017-06-13 18:18 UTC

This package is not auto-updated.

Last update: 2024-04-23 15:25:17 UTC


README

Example

use TownsendSecurity\Akm;
use TownsendSecurity\KeyServer;

$akm = new Akm();

$key_server = new KeyServer(
    $server_name,
    $server_host,
    $path_to_local_cert,
    $path_to_ca_cert
);
$akm->addKeyServer($key_server);

$saved_key = $akm->getKeyValue('my_key');

$encrypted_data = $akm->encrypt('test data', 'my_key');
$plaintext = $akm->decrypt($encrypted_data);
assert($plaintext === 'test data');