Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/websoftwares/cipher
- Owner: websoftwares
- Created: 2013-03-27T18:36:08.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-31T09:52:05.000Z (almost 12 years ago)
- Last Synced: 2024-10-12T13:15:45.521Z (3 months ago)
- Language: PHP
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;
```