marcosmarcolin/fricc2_encrypter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marcosmarcolin/fricc2_encrypter

Composer 安装命令:

composer require marcosmarcolin/fricc2_encrypter

包简介

Encrypt your php files using the fricc2 extension.

README 文档

README

This package aims to facilitate the encryption of your PHP scripts using the FRICC2 extension.

It is just a resource to facilitate the use of the Encoder which is executed via Shell.

Encoder

For the tool to work, you need to have the encoder in /usr/bin/fricc2 installed on your OS.

By default, it will use the name fricc2, but if you installed it with another name, you can inform it in the constructor of the Encrypter class.

Installation

composer require marcosmarcolin/fricc2_encrypter

Compatibility

Tested only in Linux environment: Ubuntu and Debian.

PHP version >= 7.4.x is required.

How to use

To encode only 1 file:

<?php

use MarcosMarcolin\Fricc2Encrypter\Encrypter;

include 'vendor/autoload.php';

$from = __DIR__ . '/src/file.php';
$to = __DIR__ . '/src/new_file.php';

try {
    $Encrypter = new Encrypter($from, $to);
    $Encrypter->simpleEncrypt(); // true or false
} catch (Exception $e) {
    // Any error that occurs will throw an exception.
    var_dump($e->getMessage());
}

To code one directory to another recursively, use:

<?php

try {
    $Encrypter = new Encrypter($from, $to);
    $Encrypter->recursiveEncrypt(); // true or false
} catch (Exception $e) {
    // Any error that occurs will throw an exception.
    var_dump($e->getMessage());
}

To capture the files that failed or succeeded use:

<?php

// Only for recursive encoder

$faileds = $Encrypter->getFaileds()); // array
$success = $Encrypter->getSuccess()); // array

Code quality

To check for errors with PHPCS:

composer phpcs

To automatically correct errors with PHPCS:

composer phpcbf

To check for errors with PHPInsights:

composer phpinsights

To automatically correct errors with PHPInsights:

composer phpinsights-fix

Author

Marcos Marcolin marcolindev@gmail.com

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固