townsend / akm
Connection library for the Townsend AKM.
v1.0.0
2017-06-13 18:18 UTC
Requires
- defuse/php-encryption: ^2.1
Requires (Dev)
- phpunit/phpunit: ^6.0
- squizlabs/php_codesniffer: ^2.8
This package is not auto-updated.
Last update: 2025-04-22 19:51:23 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');