PHP code example of windhoney / yii2-acm-kms

1. Go to this page and download the library: Download windhoney/yii2-acm-kms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

windhoney / yii2-acm-kms example snippets


'ali_cloud' => [
        'access_key' => [
            'access_key_id' => 'xh*********O',
            'access_key_secret' => 'jE************3',
        ],
        'acm_key_list' => ['acm_bi_db'],
        'acm_bi_db' => [
            'namespace' => '40b************1b',
            'app_name' => 'app**',
            'data_id' => 'cipher-db***',
            'group' => 'group**',
            'is_encrypt' => 1,//1KMS加密2不加密
            'end_point' => 'acm.aliyun.com',
            'port' => '8080',
            'kms_region_id' => 'cn-shanghai',
            'kms_host' => 'kms.cn-shanghai.aliyuncs.com',
        ]
    ]

$ali_helper = new AcmHelper($key_name);//$key_name=acm_bi_db
$result = $ali_helper->getConfig();

$ali_helper->listenConfig($content)