PHP code example of micseres / micro-service-encrypt

1. Go to this page and download the library: Download micseres/micro-service-encrypt 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/ */

    

micseres / micro-service-encrypt example snippets


$this->encrypt = new OpenSSLEncrypt('CAMELLIA-256-CFB');
//or $this->encrypt = new DummyEncrypt(); to do nothing

$this->encrypt->setPassword($this->bobDH->getSharedKey($alicePublickKey));

$secure = $this->encrypt->encrypt($request);
$plain = $this->encrypt->decrypt($request);