Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filipsedivy/recryptor
🔐 Class for quick and easy change the encryption algorithm
https://github.com/filipsedivy/recryptor
algorithm password rehash security-tools
Last synced: 12 days ago
JSON representation
🔐 Class for quick and easy change the encryption algorithm
- Host: GitHub
- URL: https://github.com/filipsedivy/recryptor
- Owner: filipsedivy
- License: mit
- Created: 2017-10-20T20:01:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T23:14:29.000Z (about 7 years ago)
- Last Synced: 2024-10-17T22:45:33.069Z (about 1 month ago)
- Topics: algorithm, password, rehash, security-tools
- Language: PHP
- Size: 211 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/filipsedivy/ReCryptor.svg?branch=master)](https://travis-ci.org/filipsedivy/ReCryptor) [![Latest Stable Version](https://poser.pugx.org/filipsedivy/recryptor/v/stable)](https://packagist.org/packages/filipsedivy/recryptor) [![Total Downloads](https://poser.pugx.org/filipsedivy/recryptor/downloads)](https://packagist.org/packages/filipsedivy/recryptor) [![License](https://poser.pugx.org/filipsedivy/recryptor/license)](https://packagist.org/packages/filipsedivy/recryptor)
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
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
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
setInput('Hello world');
echo $sha512->hash();
```### Comparison of hash
```php
setInput('Hello world');
$sha512->setHash('098f6bcd4621d373cade4e832627b4f6');
var_dump($sha512->isAlgorithm());
```Use example diagram
===================
Donate
======
PayPal: [email protected]