PHPackages                             davidecaruso/crypt - 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. davidecaruso/crypt

ActiveLibrary[Security](/categories/security)

davidecaruso/crypt
==================

PHP library to securely encrypt/decrypt strings.

v2.0.1(5y ago)215[1 PRs](https://github.com/davidecaruso/crypt/pulls)MITPHPPHP ^7.3CI failing

Since Apr 25Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/davidecaruso/crypt)[ Packagist](https://packagist.org/packages/davidecaruso/crypt)[ Docs](https://github.com/davidecaruso/crypt)[ RSS](/packages/davidecaruso-crypt/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

 [![Crypt](https://github.com/davidecaruso/crypt/raw/master/logo.png "Crypt")](https://github.com/davidecaruso/crypt/raw/master/logo.png)

 [![](https://camo.githubusercontent.com/5f37d23e4891adf30f2ce41f1da6c2fbde6d6c7e05b46cb6f281a40a10bbb86f/68747470733a2f2f636f6465636f762e696f2f67682f64617669646563617275736f2f63727970742f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d3242394b304f5335534a)](https://codecov.io/gh/davidecaruso/crypt) [![](https://camo.githubusercontent.com/d293c7d2833228aae4722bb72d8f4930bffca4cad61ac41062be6a02339a8e94/68747470733a2f2f7472617669732d63692e6f72672f64617669646563617275736f2f63727970742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/davidecaruso/crypt) [![Latest Stable Version](https://camo.githubusercontent.com/b82d4e967d546479f5df57494f58be1e06e496191071a3a2269fcc604b89d99f/68747470733a2f2f706f7365722e707567782e6f72672f64617669646563617275736f2f63727970742f762f737461626c652e737667)](https://packagist.org/packages/davidecaruso/crypt) [![License](https://camo.githubusercontent.com/281cd4ca14ed270989b8bfa59dfa47a3d8118cb3677705ce957314187a39bbef/68747470733a2f2f706f7365722e707567782e6f72672f64617669646563617275736f2f63727970742f6c6963656e73652e737667)](https://packagist.org/packages/davidecaruso/crypt)

> Two-way encryption PHP library.

Install
-------

[](#install)

```
composer require davidecaruso/crypt
```

How to use
----------

[](#how-to-use)

### Idempotent way

[](#idempotent-way)

By this way, the encryption algorithm will always return the same output when encrypt the same text.

```
