PHP code example of kalider / php-seb-generator

1. Go to this page and download the library: Download kalider/php-seb-generator 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/ */

    

kalider / php-seb-generator example snippets


use Kalider\PhpSebGenerator\SebConfigGenerator;

$config = file_get_contents('examples/example-seb-config.json');
$startPassword = 'test';
$quitPassword = 'test';
$adminPassword = 'test';

$sebConfig = json_decode($config, true);

$encryptedSebConfig = SebConfigGenerator::generate($sebConfig, $startPassword, $quitPassword, $adminPassword);

use Kalider\PhpSebGenerator\SebConfigGenerator;

$config = file_get_contents('examples/example-seb-config.json');
$startPassword = 'test';
$quitPassword = 'test';
$adminPassword = 'test';

$sebConfig = json_decode($config, true);
$path = 'output/test.seb';
$created = SebConfigGenerator::generateToFile($sebConfig, $path, $startPassword, $quitPassword, $adminPassword);
bash
composer