mx-solutions/mx-security-tools
Composer 安装命令:
composer create-project mx-solutions/mx-security-tools
包简介
Collection of utilities designed to enhance cybersecurity and protect softwares
README 文档
README
Security Tools
table of contents
- General Description
- Code Quality
- Main Features
- Installation
- Usage
- Advanced Configuration
- Contributions
- License
General Description
This package is designed to simplify the safe and customizable generation of random elements in PHP projects.
Code Quality
PHP 8.4+ Compatibility:
=> Fully compatible with PHP 8.4 and later versions.
PSR Compliance:
=> The codebase adheres to PHP Standards Recommendations (PSRs) including:
- PSR-1 (Basic Coding Standard) https://www.php-fig.org/psr/psr-1/
- PSR-4 (Autoloading Standard) https://www.php-fig.org/psr/psr-4/
- PSR-12 (Extended Coding Style) https://www.php-fig.org/psr/psr-12/
Static Analysis:
=> Validated at the highest level of PHPStan analysis, ensuring code reliability and reducing potential runtime errors.
Extensive Testing:
=> Comprehensive unit and integration tests to ensure reliability and prevent regressions.
Modern PHP Features:
=> Utilizes named arguments (introduced in PHP 8.0), enhancing code readability and reducing errors from argument order.
Secure By Design:
=> Security considerations are built into the core architecture and design of the software.
SOLID Principles:
=> Structured following SOLID principles to ensure maintainability and scalability.
YAGNI (You Ain't Gonna Need It):
=> Implement features only when they are necessary, not when you anticipate needing them.
DRY (Don't Repeat Yourself):
=> Eliminates redundancy by abstracting common functionalities.
KISS (Keep It Simple, Stupid):
=> Maintains simplicity and avoids unnecessary complexity.
By adhering to these principles and practices, the goal is to provide a robust, maintainable, and secure package for our users.
Main Features
- Random strong and secure password generation
- Random number generation
- Random key generation
- Customization of characters used (lowercase, uppercase, numbers, special characters)
Installation
The easiest way to get started with Mx-Solutions Security Tools is to go through composer to install or require the PHP package.
composer require mx-solutions/mx-security-tools
N.B.: Due to security vulnerabilities identified in previous versions of PHP, this package requires PHP version 8.4.3
Git Clone
You can also download the Mx-Solutions Security Tools source code directly from the Git clone:
git clone https://github.com/mx-solutions/mx-security-tools
Package also available on the Packagist.org website
https://packagist.org/packages/mx-solutions/mx-security-tools
Usage
Generate random password (Quick Use):
// Require Composer PSR Classes Autoloader require_once 'vendor/autoload.php'; use MxSolutions\MxSecurityTools\Password; echo 'Mx-Solution Security Tools Package' . "\n"; echo '[DEMO MODE]' . "\n\n"; echo 'Generate random 16 characters strong password' . "\n"; $password = Password::generate(); echo 'Password: ' . $password . "\n\n";
Advanced Configuration
Generate random password with additionnal options:
echo 'Generate random 64 characters strong password' . "\n"; $password = Password::generate( length: 64, useUpper: true, useLower: true, useDigits: true, useSymbols: true ); echo 'Password: ' . $password . "\n\n";
Contributions
Interested in participating in this project?
At the moment, you can:
- report bugs
- request new features to be added
- propose a translation of all or part of the documentation
- make a donation to support the project.
License
This project is licensed under the MIT License
2017 (c) Mx Solutions
See the LICENSE file for details
mx-solutions/mx-security-tools 适用场景与选型建议
mx-solutions/mx-security-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 02 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mx-solutions/mx-security-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mx-solutions/mx-security-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-03