PHPackages                             moviet/php-encryption - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. moviet/php-encryption

ActiveLibrary[Security](/categories/security)

moviet/php-encryption
=====================

A speed metal encryption library for php

v1.1.0(7y ago)0144MITPHPPHP &gt;=7.0

Since Dec 18Pushed 7y agoCompare

[ Source](https://github.com/moviet/php-encryption)[ Packagist](https://packagist.org/packages/moviet/php-encryption)[ Docs](https://github.com/moviet/php-encryption)[ RSS](/packages/moviet-php-encryption/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Crypsic - A speed metal encryption library for php
==================================================

[](#crypsic---a-speed-metal-encryption-library-for-php)

[![Build Status](https://camo.githubusercontent.com/686bec5fdb11be6bc2d05199a2d115370b5b5dfed5a2d8e0a91f2c7ead69f2fd/68747470733a2f2f7472617669732d63692e6f72672f6d6f766965742f7068702d656e6372797074696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/moviet/php-encryption)[![License](https://camo.githubusercontent.com/1e1cb7bae9fc55a01fc5443d26e358dc21c129253bcfa9841db85c4f25aa2ecf/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6d69742d626c75652e7376673f7374796c653d666c61742d737175617265)](http://doge.mit-license.org)[![Usage](https://camo.githubusercontent.com/0b08974388db1eb1c4bdd7154a157aeb6ee7ba89469165e7752420415ab89270/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f75736167652d656173792d6666363962342e737667)](https://github.com/moviet/php-encryption)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a0137e9007795cc2fce3ac01ed5da7dd4253be5039a5be9152ed19673d553d85/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f766965742f7068702d656e6372797074696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/moviet/php-encryption/?branch=master)[![Code Intelligence Status](https://camo.githubusercontent.com/8c79a179525250087d14818ff7ef5f732e2f8dfc7e4424f2b4ac0ceecfc7459d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f766965742f7068702d656e6372797074696f6e2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

#### Crypsic is made to be Fast and Secure By Default

[](#crypsic-is-made-to-be-fast-and-secure-by-default)

This is pretty suits for **PHP devlovers** and also built up for standalone like pro,
our sources does very simply, included **Crypsic** and **Pwsuit** for supporting native Ops

Requirements
------------

[](#requirements)

- **PHP v5.6** (non-tested) or **PHP v7.0+** (tested)
- Openssl extensions must be enable
- Composer autoload [PSR4](https://www.php-fig.org/psr/psr-4/)
- Composer for installation

Let's Start
-----------

[](#lets-start)

#### Installation

[](#installation)

```
composer require "moviet/php-encryption"

```

Best Practices
--------------

[](#best-practices)

- Do not ever encrypt **a password**
- Use our instant **`Pwsuit`** to protect a password that supply *modern hashes*
- **Pwsuit** dedicated for non-coverable performed, so do not forget the password
- Do not use *`a same key`* for many secret informations, you can do it well
- You may need a concern to manage the ***keys*** correctly, it must be treat a safely
- `Encryption` doesn't same as s-e-c-u-r-i-t-y, so do not construct a bullet proof
- You must follow the standard security design that suitable for your system

Features
--------

[](#features)

- A Symmetric Crypto
- Customable Cipher Modes
- Instant Encrypt And Decrypt
- Auto Generate Secure Random Key
- Suitable Password Algorithms
- Secure A Key With Password

#### A Symmetric Crypto

[](#a-symmetric-crypto)

It's meant the current crypto available is only for crafting symmetric encryption

#### Customable Cipher Modes

[](#customable-cipher-modes)

- You can modify the cipher modes using our own mode functions like

    ```
    Crypsic::mode('CBC-128') // AES-128-CBC
    ```

    this is **optional** usage, if nothing, it will set to `AES-256-CBC` as **default mode**

    **notes** :

    > 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.

#### Instant Encrypt And Decrypt

[](#instant-encrypt-and-decrypt)

- You can encrypt a secret ID, texts or any others secret information like

    ```
    Crypsic::listen('My card number 9999-6666-6666-9999')
    ```
- And simply decrypt your secret information like

    ```
    $mySecretData = 'Dada/nanana367OYeyeyyHola666HoopYeYEYsipp+imo27blablabla'

     Crypsic::look($mySecretData)
    ```

#### Auto Generate Secure Random Key

[](#auto-generate-secure-random-key)

- You can not decrypt your secret information without a key, so you must create a key at first

    ```
    Crypsic::saveKey('This is new key please make em zig-zag, bilbo')
    ```

    **Notes** : don't forget to generate a long and heavy characters for your key

    it will auto calculate your key with *Cryptographically Secure Random* functions

    for PHP v7.0+ and Openssl pseudo random for PHP v5.6 by very happier
- After you save a key belong encryption data, so you can confirm like so

    ```
    Crypsic::key('edfes73ccd0191jbabbdbab0101bdbeb10290abbaba1010edsf820')
    ```

#### Suitable Password Algorithms

[](#suitable-password-algorithms)

- You can dynamically set a Password like so

    ```
    Pwsuit::pwhash('Default','hello this is my password')
    ```
- or custom like

    ```
    Pwsuit::cost(26)->pwhash('Default','Yes dont blow my head')
    ```

    on above will equivalent like

    `password_hash('My password', PASSWORD_DEFAULT, ['cost'=>26])`
- If you use new PHP v7.2+ you can try ***Modern Hashes*** like

    ```
    Pwsuit::pwhash('Argon2i','my Argon password is dadada')
    ```
- or any custom like

    ```
    Pwsuit::memory(4024)
    ->time(4)
    ->thread(4)
    ->pwhash('Argon2id','Hey bob this is my password')
    ```

    it will give you a **nicely smile** by PHP *'out of the box'*

#### Secure A Key With Password

[](#secure-a-key-with-password)

- We attach new crazybility to protect your secret with password like below

    ```
    // First create Keystore and save
    Crypsic::saveKey('let me burn the typos')

    // Then create password and save
    Pwsuit::cost(16)->pwhash('Default','MyPassword')
    ```

    **Notes** :

    > a **'cost'** length is optional, if higher may have **slow**, but that was better
- Then to decrypt and verify your secret using **key with password** just simply

    ```
    $postPassword = $_POST['password']

    Crypsic::authKey($postPassword)->hash('My Data Hashed Password')->key('My key')

    Crypsic::look('My Encrypt Data')
    ```

    **Notes** :

    > Hash and encrypt data has **different results**, please use correctly
- You can also use this lib as standalone to generate password and to verify

    ```
    Pwsuit::pwTrust($myPassword, $dataPassword) // Return Boolen
    ```
- Refresh the old password hashed using like

    ```
    Pwsuit::pwRehash('Default', $myPassword, $dataPassword)
    ```
- Ensuring the current hashed data that you've decorated

    ```
    $info = Pwsuit::pwInfo($my_data_hashed) \\ see dump output with yaayy
    ```

Happy Usage
-----------

[](#happy-usage)

#### Encrypt And Decrypt With No Password :

[](#encrypt-and-decrypt-with-no-password-)

```
require '__DIR__' . '/vendor/autoload.php';

use Moviet\Heavy\Crypsic;
use Moviet\Heavy\Hash\Pwsuit;

/*
* Create a long and burn your typos, whatever
*/
$mykey = Crypsic::saveKey('Something a heavy key');

// output : c185128d2ae131b3ecf25779d2ef6120a6d9aa53ea5f422e0e2f6e97385954e9

Crypsic::key($mykey);

$encrypt = Crypsic::listen('this is new metal song : 9999-8888-6666-1717');

// output : J7A2jpefNGp8HBFH0i1Xon5l59EnGFs8zFWdcMlZ1BQ4cYhNv+awNMOLZMcehkc2k6coPlN1oprVCTZPC60t6p5JvLcZHxAPVC5v08XHIYss+yTuLuYZ5CH6RfDpaZzZ

$decrypt = Crypsic::look($encrypt);

// output : this is new metal song : 9999-8888-6666-1717
```

#### Encrypt And Decrypt With Password :

[](#encrypt-and-decrypt-with-password-)

You may want to arrangement the key from sabotage, please follow this rockly 🤘

```
require '__DIR__' . '/vendor/autoload.php';

use Moviet\Heavy\Crypsic;
use Moviet\Heavy\Hash\Pwsuit;

$thor = Crypsic::saveKey('Do you know locky');

$tonyStark = Pwsuit::pwhash('Default','I know spiderman with Bob');

// Save the Output : $2y$14$yUwjHQmnOeZyHWCcA5mlE.t3nVySA5NomMGmptkbNG170T3IkGQH.

$jarvish = $_POST['password'];

$captainAfrica = Crypsic::authKey($jarvish)->hash($tonyStark)->key($thor);

$thanos = Crypsic::look($captainAfrica); // and thanos doesn't have any idea => who is bob
```

### Cipher Modes :

[](#cipher-modes-)

AttributesModesCBC-256AES-256-CBCCBC-192AES-192-CBCCBC-128AES-128-CBCCTR-256AES-256-CTRCTR-192AES-192-CTRCTR-128AES-128-CTR### Hash Algorithms :

[](#hash-algorithms-)

DefaultValuecost14memory\_cost1666time\_cost6threads6AttributesModesDefaultPASSWORD\_DEFAULTArgon2iPASSWORD\_ARGON2IArgon2dPASSWORD\_ARGON2DArgon2idPASSWORD\_ARGON2IDConclusion
----------

[](#conclusion)

By descriptions on above, you may have a short picture of how easy to use this lib

How secure is this ?

- you do not worry about it, even on production, it can do it well
- if you use for **commercial** projects please follow the best practises

License
-------

[](#license)

`Moviet/php-encryption` is released under the MIT public license. See the enclosed LICENSE for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2705d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed530423003a96fcde2086e595a1709f742c1ea47e8aa1315d5751470314b07a?d=identicon)[Moviet](/maintainers/Moviet)

---

Top Contributors

[![moviet](https://avatars.githubusercontent.com/u/45540985?v=4)](https://github.com/moviet "moviet (31 commits)")

---

Tags

aes-ciphercryptographydecryptionencryptionencryption-librarypassword-hashstandalonesymmetric-encryptionencryptioncryptoaespasswordhashcipherdecryptionsymmetric

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/moviet-php-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/moviet-php-encryption/health.svg)](https://phpackages.com/packages/moviet-php-encryption)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

127.8k1](/packages/poly-crypto-poly-crypto)[nzo/url-encryptor-bundle

The NzoUrlEncryptorBundle is a Symfony Bundle used to Encrypt and Decrypt data and variables in the Web application or passed through URL

961.0M2](/packages/nzo-url-encryptor-bundle)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3171.5k2](/packages/miladrahimi-phpcrypt)[paragonie/password_lock

Wraps Bcrypt-SHA2 in Authenticated Encryption

19348.7k1](/packages/paragonie-password-lock)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
