Commit add2a314 by Mohammad Izzat Johari

init commit

parents
{
"name": "integration/hsm-crypto",
"description": "Laravel HSM Encryption/Decryption via PKCS#11",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Zee Zaco",
"email": "izzat@3fresources.com"
}
],
"autoload": {
"psr-4": {
"integration\\HsmCrypto\\": "src/"
}
},
"require": {
"php": "^8.1",
"illuminate/support": "^10.0"
},
"extra": {
"laravel": {
"providers": [
"integration\\HsmCrypto\\HsmCryptoServiceProvider"
],
"aliases": {
"HsmCrypto": "integration\\HsmCrypto\\Facades\\HsmCrypto"
}
}
}
}
<?php
return [
'pkcs11_tool' => env('HSM_PKCS11_TOOL', ''),
'module' => env('HSM_MODULE', ''),
'pin' => env('HSM_USER_PIN', ''),
'key_label' => "key_master_".date("Y")
];
<?php
namespace integration\HsmCrypto\Facades;
use Illuminate\Support\Facades\Facade;
class HsmCrypto extends Facade
{
protected static function getFacadeAccessor()
{
return 'hsm-crypto';
}
}
<?php
namespace integration\HsmCrypto;
use Illuminate\Support\ServiceProvider;
class HsmCryptoServiceProvider extends ServiceProvider
{
public function register()
{
$this->mergeConfigFrom(
__DIR__ . '/../config/hsmcrypto.php',
'hsmcrypto'
);
$this->app->singleton('hsm-crypto', function () {
return new Pkcs11Command();
});
}
public function boot()
{
$this->publishes([
__DIR__ . '/../config/hsmcrypto.php' => config_path('hsmcrypto.php'),
], 'config');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment