ndum/laravel-seb

Laravel 包,用于生成加密的 SEB(安全考试浏览器)客户端配置

安装次数: 877

依赖者: 0

建议者: 0

安全: 0

星标: 2

关注者: 1

分支: 1

开放问题: 1

类型:laravel

v1.4.0 2024-05-14 19:42 UTC

This package is auto-updated.

Last update: 2024-09-14 20:25:28 UTC


README

此 Laravel 包提供生成加密的 SEB(安全考试浏览器)配置的可能性。它主要用于生成带有安全默认选项的自动 seb-exams 配置。

需求

Laravel 8, 9 或 10,需要 php8 以及启用了 ext-openssl, ext-zlib 扩展

限制

它只能用于密码加密的考试(目前不支持客户端配置)

安装

通过 Composer 安装。

$ composer require ndum/laravel-seb

示例

注意: 对于生产环境 - 请使用安全的密码和安全的 seb-config!

参数

$sebConfig = seb-config as json-array (show examples/example_seb_config.json)
$startPassword = encryption-password as string
$quitPassword = close-password as string
$adminPassword = admin-password as string
传统上
use Ndum\Laravel\SebConfigGenerator;
use Storage;

$config = Storage::disk('local')->get('/examples/example_seb_config.json'); // just as example...
$startPassword = 'test';
$quitPassword = 'test';
$adminPassword = 'test';

$sebConfig = json_decode($config, true);

$generator = new SebConfigGenerator();
$encryptedSebConfig = $generator->createSebConfig($sebConfig, $startPassword, $quitPassword, $adminPassword);
dd($encryptedSebConfig);
门面
use Ndum\Laravel\Facades\SebConfigGenerator;
use Storage;

$config = Storage::disk('local')->get('/examples/example_seb_config.json'); // just as example...
$startPassword = 'test';
$quitPassword = 'test';
$adminPassword = 'test';

$sebConfig = json_decode($config, true);

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

问题/贡献

直接通过 GitHub

许可证

该项目采用 MIT 许可证 - 请参阅 LICENSE 文件 获取详细信息