{"id":45184587,"url":"https://github.com/moviet/php-encryption","last_synced_at":"2026-02-20T10:30:24.987Z","repository":{"id":57020222,"uuid":"162235961","full_name":"moviet/php-encryption","owner":"moviet","description":"Crypsic - A speed metal encryption library for php","archived":false,"fork":false,"pushed_at":"2019-02-19T16:52:13.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-20T11:50:59.605Z","etag":null,"topics":["aes-cipher","cryptography","decryption","encryption","encryption-library","password-hash","standalone","symmetric-encryption"],"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/moviet.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":"2018-12-18T05:41:43.000Z","updated_at":"2019-02-19T16:52:14.000Z","dependencies_parsed_at":"2022-08-22T20:20:21.161Z","dependency_job_id":null,"html_url":"https://github.com/moviet/php-encryption","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/moviet/php-encryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moviet%2Fphp-encryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moviet%2Fphp-encryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moviet%2Fphp-encryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moviet%2Fphp-encryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moviet","download_url":"https://codeload.github.com/moviet/php-encryption/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moviet%2Fphp-encryption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29647866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aes-cipher","cryptography","decryption","encryption","encryption-library","password-hash","standalone","symmetric-encryption"],"created_at":"2026-02-20T10:30:24.328Z","updated_at":"2026-02-20T10:30:24.975Z","avatar_url":"https://github.com/moviet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Crypsic - A speed metal encryption library for php\n======================================================\n[![Build Status](https://travis-ci.org/moviet/php-encryption.svg?branch=master)](https://travis-ci.org/moviet/php-encryption)\n[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://doge.mit-license.org)\n[![Usage](https://img.shields.io/badge/usage-easy-ff69b4.svg)](https://github.com/moviet/php-encryption)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/moviet/php-encryption/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/moviet/php-encryption/?branch=master)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/moviet/php-encryption/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n\n#### Crypsic is made to be Fast and Secure By Default\n\nThis is pretty suits for **PHP devlovers** and also built up for standalone like pro,   \nour sources does very simply, included **Crypsic** and **Pwsuit** for supporting native Ops\n\n## Requirements\n\n*\t**PHP v5.6** (non-tested) or **PHP v7.0+** (tested)\n*\tOpenssl extensions must be enable\n*\tComposer autoload [PSR4](https://www.php-fig.org/psr/psr-4/)\n*\tComposer for installation\n\n## Let's Start\n\n#### Installation\n```\ncomposer require \"moviet/php-encryption\"\n```\n\n## Best Practices\n\n*\tDo not ever encrypt **a password**\n*\tUse our instant **`Pwsuit`** to protect a password that supply _modern hashes_\n*\t**Pwsuit** dedicated for non-coverable performed, so do not forget the password\n*\tDo not use _`a same key`_ for many secret informations, you can do it well\n*\tYou may need a concern to manage the **_keys_** correctly, it must be treat a safely\n*\t`Encryption` doesn't same as s-e-c-u-r-i-t-y, so do not construct a bullet proof\n*\tYou must follow the standard security design that suitable for your system\n\n## Features\n\n*\tA Symmetric Crypto\n*\tCustomable Cipher Modes\n*\tInstant Encrypt And Decrypt\n*\tAuto Generate Secure Random Key\n*\tSuitable Password Algorithms\n*\tSecure A Key With Password\n\n#### A Symmetric Crypto\n\nIt's meant the current crypto available is only for crafting symmetric encryption\n\n#### Customable Cipher Modes\n\n* You can modify the cipher modes using our own mode functions like\n  ```php\n  Crypsic::mode('CBC-128') // AES-128-CBC\n  ```\n\n  this is **optional** usage, if nothing, it will set to ```AES-256-CBC``` as **default mode**\n  \n  **notes** :\n  \u003e If you want to set mode, _please use one for one operation_, if you don't know we're highly recommended that you **_ignore it_**, and set as default mode for easy usage.  \n\n#### Instant Encrypt And Decrypt\n\n* You can encrypt a secret ID, texts or any others secret information like\n   ```php\n   Crypsic::listen('My card number 9999-6666-6666-9999')\n   ```\n\n* And simply decrypt your secret information like\n   ```php\n   $mySecretData = 'Dada/nanana367OYeyeyyHola666HoopYeYEYsipp+imo27blablabla'\n\n    Crypsic::look($mySecretData)\n    ```\n\n#### Auto Generate Secure Random Key\n\n* You can not decrypt your secret information without a key, so you must create a key at first\n   ```php\n   Crypsic::saveKey('This is new key please make em zig-zag, bilbo')\n   ```\n\n   **Notes** : don't forget to generate a long and heavy characters for your key\n\t \n   it will auto calculate your key with _Cryptographically Secure Random_ functions \n   \n\t for PHP v7.0+ and Openssl pseudo random for PHP v5.6 by very happier\n\n* After you save a key belong encryption data, so you can confirm like so\n   ```php\n   Crypsic::key('edfes73ccd0191jbabbdbab0101bdbeb10290abbaba1010edsf820')\n   ```\n\n#### Suitable Password Algorithms\n\n* You can dynamically set a Password like so\n  ```php\n  Pwsuit::pwhash('Default','hello this is my password')\n  ```\n\n* or custom like\n  ```php\n  Pwsuit::cost(26)-\u003epwhash('Default','Yes dont blow my head')\n  ```\n\n  on above will equivalent like\n\n  `password_hash('My password', PASSWORD_DEFAULT, ['cost'=\u003e26])`\n\n\n* If you use new PHP v7.2+ you can try **_Modern Hashes_** like\n  ```php\n  Pwsuit::pwhash('Argon2i','my Argon password is dadada')\n  ```\n\n* or any custom like\n  ```php\n  Pwsuit::memory(4024)\n  -\u003etime(4)\n  -\u003ethread(4)\n  -\u003epwhash('Argon2id','Hey bob this is my password')\n  ```\n\n  it will give you a **nicely smile** by PHP _'out of the box'_\n\n#### Secure A Key With Password\n\n* We attach new crazybility to protect your secret with password like below\n   ```php\n   // First create Keystore and save\n   Crypsic::saveKey('let me burn the typos')\n   \n   // Then create password and save\n   Pwsuit::cost(16)-\u003epwhash('Default','MyPassword')\n   ```\n\n   **Notes** : \n   \u003e a **'cost'** length is optional, if higher may have **slow**, but that was better\n\n* Then to decrypt and verify your secret using **key with password** just simply\n   ```php\n   $postPassword = $_POST['password']\n\n   Crypsic::authKey($postPassword)-\u003ehash('My Data Hashed Password')-\u003ekey('My key')\n\n   Crypsic::look('My Encrypt Data')\n   ```\n\n   **Notes** : \n   \u003e Hash and encrypt data has **different results**, please use correctly\n\n* You can also use this lib as standalone to generate password and to verify\n   ```php\n   Pwsuit::pwTrust($myPassword, $dataPassword) // Return Boolen\n   ```\n\n* Refresh the old password hashed using like\n   ```php\n   Pwsuit::pwRehash('Default', $myPassword, $dataPassword)\n   ```\n\n* Ensuring the current hashed data that you've decorated\n\n   ```php\n   $info = Pwsuit::pwInfo($my_data_hashed) \\\\ see dump output with yaayy\n   ```\n\n## Happy Usage\n\n#### Encrypt And Decrypt With No Password :\n```php\nrequire '__DIR__' . '/vendor/autoload.php';\n\nuse Moviet\\Heavy\\Crypsic;\nuse Moviet\\Heavy\\Hash\\Pwsuit;\n\n/*  \n* Create a long and burn your typos, whatever\n*/\n$mykey = Crypsic::saveKey('Something a heavy key');\n\n// output : c185128d2ae131b3ecf25779d2ef6120a6d9aa53ea5f422e0e2f6e97385954e9\n\nCrypsic::key($mykey); \n\n$encrypt = Crypsic::listen('this is new metal song : 9999-8888-6666-1717'); \n\n// output : J7A2jpefNGp8HBFH0i1Xon5l59EnGFs8zFWdcMlZ1BQ4cYhNv+awNMOLZMcehkc2k6coPlN1oprVCTZPC60t6p5JvLcZHxAPVC5v08XHIYss+yTuLuYZ5CH6RfDpaZzZ\n\n$decrypt = Crypsic::look($encrypt); \n\n// output : this is new metal song : 9999-8888-6666-1717\n```\n\n#### Encrypt And Decrypt With Password :\n\nYou may want to arrangement the key from sabotage, please follow this rockly :metal:\n\n```php\nrequire '__DIR__' . '/vendor/autoload.php';\n\nuse Moviet\\Heavy\\Crypsic;\nuse Moviet\\Heavy\\Hash\\Pwsuit;\n\n$thor = Crypsic::saveKey('Do you know locky');\n\n$tonyStark = Pwsuit::pwhash('Default','I know spiderman with Bob');\n\n// Save the Output : $2y$14$yUwjHQmnOeZyHWCcA5mlE.t3nVySA5NomMGmptkbNG170T3IkGQH.\n\n$jarvish = $_POST['password'];\n\n$captainAfrica = Crypsic::authKey($jarvish)-\u003ehash($tonyStark)-\u003ekey($thor);\n\n$thanos = Crypsic::look($captainAfrica); // and thanos doesn't have any idea =\u003e who is bob\n\n```\n### Cipher Modes :\n\n| Attributes       | Modes         | \n| ---------------- |:-------------:| \n| CBC-256          |  AES-256-CBC  |\n| CBC-192          |  AES-192-CBC  | \n| CBC-128          |  AES-128-CBC  | \n| CTR-256          |  AES-256-CTR  |\n| CTR-192          |  AES-192-CTR  | \n| CTR-128          |  AES-128-CTR  |\n\n### Hash Algorithms :\n\n| Default         | Value   | \n|:--------------- |:-------:| \n| cost            | 14      | \n| memory_cost     | 1666    | \n| time_cost       | 6       |\n| threads         | 6       |\n\n| Attributes     | Modes                | \n| -------------- |---------------------:| \n| Default        | PASSWORD_DEFAULT     |\n| Argon2i        | PASSWORD_ARGON2I     | \n| Argon2d        | PASSWORD_ARGON2D     | \n| Argon2id       | PASSWORD_ARGON2ID    |\n\n## Conclusion\n\nBy descriptions on above, you may have a short picture of how easy to use this lib\n\nHow secure is this ?\n- you do not worry about it, even on production, it can do it well\n- if you use for **commercial** projects please follow the best practises\n\n## License\n\n`Moviet/php-encryption` is released under the MIT public license. See the enclosed LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoviet%2Fphp-encryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoviet%2Fphp-encryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoviet%2Fphp-encryption/lists"}