Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/websoftwares/cipher

Encrypts/decrypts text with RIJNDAEL 256 Cipher.
https://github.com/websoftwares/cipher

Last synced: 29 days ago
JSON representation

Encrypts/decrypts text with RIJNDAEL 256 Cipher.

Awesome Lists containing this project

README

        

# Cipher

Encrypts/decrypts text with RIJNDAEL 256 Cipher.

[![Build Status](https://api.travis-ci.org/websoftwares/Cipher.png)](https://travis-ci.org/websoftwares/Cipher)

## Usage

```
$securekey = '4s05Gim69k6Cn7E4Wl03cEI5v9K49l95';

$size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB);
$iv = mcrypt_create_iv($size, MCRYPT_DEV_URANDOM);

$cipher = new Cipher($securekey, $iv);

$encrypted = $cipher->encrypt('MySuperSecretText');
$decrypted = $cipher->decrypt($encrypted);

echo $decrypted;
```