jeferson-lsouza / isipass
负责密码管理和创建的组件。
dev-master
2020-07-19 23:13 UTC
Requires
- php: ^7.0
This package is auto-updated.
Last update: 2024-09-20 08:02:58 UTC
README
IsiPass 库
IsiPass 库是一组用于密码创建和验证的类。IsiPass Library é um conjunto de classes desenvolvidas para a criação e verificação de senhas.
亮点
- 简单安装(Instalação simples)
- 易于结构和应用(Fácil estruturação e aplicação)
- Composer 适配且符合 PSR-2 规范(Pronto para o composer e compatível com PSR-2)
安装
通过 Composer 可用
"JefersonLSouza/IsiPass": "^1.0"
或运行
composer require JefersonLSouza/IsiPass
文档
有关如何使用的详细信息,请参阅组件目录中的示例文件夹。其中包含每个类的使用示例。它的工作方式如下
更多关于如何使用的详细信息,请查看组件目录中的示例文件夹。您将在这里找到每个类的使用示例。它的工作方式如下:
创建密码(调用):要创建加密密码,只需遵循以下示例
<?php require __DIR__ . "/../vendor/autoload.php"; //My Password $pass = '12345'; $url = new \Developers\Password(); //Call the method to create the password $result = $url -> CreatePass($pass); //Print echo $result;
验证密码(调用)- 如果要检查用户输入的密码是否与数据库中注册的密码相同,以下是一个示例
<?php require __DIR__ . "/../vendor/autoload.php"; $url = new \Developers\Password(); //The user entered the password and the pass variable stores the value entered in the form. $pass = '12345'; //The value of the hash variable would be coming from the database. $hash = '$2y$10$qfGfQRGVb5/YMy6mZ.oSgeBrLyDoZTzQSMLaqyIA3tE/5O4YJarhG'; //Second: Verify Password $result = $url -> VerifyPass($pass, $hash); //Returns the value 1 if the verified password is true, otherwise only zero or empty, informing that the password entered is not the same. echo $result;
生成密码(调用)-
要自动和随机地创建密码,请遵循以下示例
<?php require __DIR__ . "/../vendor/autoload.php"; $url = new \Developers\Password(); //Generates the password randomly, including uppercase, lowercase, numbers and symbols. $result = $url -> GeneratePass(); //Print echo $result;
其他
所有带有实际示例的文档和使用说明都可在库的 examples 文件夹中找到。请查看。
所有带有实际示例的文档和使用说明都可在本库的 examples 文件夹中找到。请查看。
贡献
有关详细信息,请参阅CONTRIBUTING。
支持
安全:如果您发现任何安全相关的问题,请通过电子邮件 contato@interligsolucoes.com.br 而不是使用问题跟踪器。
如果您发现任何安全相关的问题,请通过电子邮件 contato@interligsolucoes.com.br 而不是使用问题跟踪器。
谢谢
鸣谢
- Jeferson L. Souza(开发者)
- Soluções Inteligentes(团队)
- 所有贡献者(力量)
许可
MIT 许可证(MIT)。有关更多信息,请参阅许可文件。