承接 filipsedivy/recryptor 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

filipsedivy/recryptor

Composer 安装命令:

composer require filipsedivy/recryptor

包简介

🔐 Class for quick and easy change the encryption algorithm

README 文档

README

Build Status Latest Stable Version Total Downloads License

Introduction

ReCryptor can quickly and safely change your encryption algorithm.

ReCryptor is good for you if you use an outdated encryption algorithm and you need to change to a new one without a system failure and so users do not know anything.

Installation

The recommended way to install is via Composer:

composer require filipsedivy/recryptor

It needed a minimum version of PHP 5.6.

Usage

Recrypt password

<?php
require_once __DIR__ . '/vendor/autoload.php';

$recryptor = new ReCryptor();
$recryptor->setInput('MyPassword');
$recryptor->setHash('daa1f31819ed4928fd00e986e6bda6dab6b177dcbool');
$result = $recryptor->recrypt('SHA1');

if($result->needRehash())
{
    // Need save new hash
    $hash = $result->getHash();
}
else
{
    // Not need change hash
}

List all available algorithms

<?php
require_once __DIR__.'/vendor/autoload.php';
$recryptor = new ReCryptor();
print_r($recryptor->getAlgorithms());

Object of the algorithm

It is also possible to use hash classes. Using them, you can encrypt the input or have the hash validated. Each class inherits the object ReCryptor\Abstraction\Algorithm.

Base usage

<?php
require_once __DIR__.'/vendor/autoload.php';
use ReCryptor\Algorithm\SHA512;
$sha512 = new SHA512();
$sha512->setInput('Hello world');
echo $sha512->hash();

Comparison of hash

<?php
require_once __DIR__.'/vendor/autoload.php'
use ReCryptor\Algorithm\SHA512;
$sha512 = new SHA512();
$sha512->setInput('Hello world');
$sha512->setHash('098f6bcd4621d373cade4e832627b4f6');
var_dump($sha512->isAlgorithm());

Use example diagram

Donate

PayPal: mail@filipsedivy.cz

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固