{"id":16292369,"url":"https://github.com/filipsedivy/recryptor","last_synced_at":"2025-04-09T08:46:17.993Z","repository":{"id":62504672,"uuid":"107721077","full_name":"filipsedivy/ReCryptor","owner":"filipsedivy","description":"🔐 Class for quick and easy change the encryption algorithm","archived":false,"fork":false,"pushed_at":"2017-11-14T23:14:29.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T03:14:59.473Z","etag":null,"topics":["algorithm","password","rehash","security-tools"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipsedivy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-20T20:01:25.000Z","updated_at":"2017-10-26T19:34:53.000Z","dependencies_parsed_at":"2022-11-02T12:30:40.909Z","dependency_job_id":null,"html_url":"https://github.com/filipsedivy/ReCryptor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2FReCryptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2FReCryptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2FReCryptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2FReCryptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipsedivy","download_url":"https://codeload.github.com/filipsedivy/ReCryptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008610,"owners_count":21032554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","password","rehash","security-tools"],"created_at":"2024-10-10T20:05:59.613Z","updated_at":"2025-04-09T08:46:17.975Z","avatar_url":"https://github.com/filipsedivy.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\".ReCryptor/images/logo_small.png\"\u003e\n\u003c/p\u003e\n\n[![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)\n\nIntroduction\n------------\n\nReCryptor can quickly and safely change your encryption algorithm.\n\nReCryptor 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.\n\nInstallation\n------------\n\nThe recommended way to install is via Composer:\n\n```\ncomposer require filipsedivy/recryptor\n```\n\nIt needed a minimum version of PHP 5.6.\n\nUsage\n-----\n\n### Recrypt password\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$recryptor = new ReCryptor();\n$recryptor-\u003esetInput('MyPassword');\n$recryptor-\u003esetHash('daa1f31819ed4928fd00e986e6bda6dab6b177dcbool');\n$result = $recryptor-\u003erecrypt('SHA1');\n\nif($result-\u003eneedRehash())\n{\n    // Need save new hash\n    $hash = $result-\u003egetHash();\n}\nelse\n{\n    // Not need change hash\n}\n```\n\n\n### List all available algorithms\n\n```php\n\u003c?php\nrequire_once __DIR__.'/vendor/autoload.php';\n$recryptor = new ReCryptor();\nprint_r($recryptor-\u003egetAlgorithms());\n```\n\nObject of the algorithm\n=======================\n\nIt 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`.\n### Base usage\n\n```php\n\u003c?php\nrequire_once __DIR__.'/vendor/autoload.php';\nuse ReCryptor\\Algorithm\\SHA512;\n$sha512 = new SHA512();\n$sha512-\u003esetInput('Hello world');\necho $sha512-\u003ehash();\n```\n\n### Comparison of hash\n\n```php\n\u003c?php\nrequire_once __DIR__.'/vendor/autoload.php'\nuse ReCryptor\\Algorithm\\SHA512;\n$sha512 = new SHA512();\n$sha512-\u003esetInput('Hello world');\n$sha512-\u003esetHash('098f6bcd4621d373cade4e832627b4f6');\nvar_dump($sha512-\u003eisAlgorithm());\n```\n\nUse example diagram\n===================\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\".ReCryptor/images/use.png\"\u003e\n\u003c/p\u003e\n\nDonate\n======\nPayPal: mail@filipsedivy.cz","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipsedivy%2Frecryptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipsedivy%2Frecryptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipsedivy%2Frecryptor/lists"}