PHP Classes

PHP Cryptor: Encrypt and decrypt data using mcrypt

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 52%Total: 400 All time: 6,567 This week: 571Up
Version Licenses PHP version Categories
cryptor 1.0Artistic License, B...5.0PHP 5, Cryptography
Description 

Author

This class can encrypt and decrypt data using mcrypt.

It takes a given string of data and encrypts it using an hash of a given encryption key prepended with a class internal key.

The class can also do the opposite, i.e. decrypt previously encrypted data with the class to restore the original data string.

Picture of Nick Daniels
  Performance   Level  
Name: Nick Daniels <contact>
Classes: 13 packages by
Country: United States United States
Age: 34
All time rank: 1108160 in United States United States
Week rank: 34 Up5 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Example

<?php
/**
 * A Custom Cryptor
 * --------------------
 * Devel: Nick Daniels
 * Twttr: @ManicSec
 */

// Do encryption
echo Cryptor::encrypt("test", md5("sec"))."\n";

// Do decryption
echo Cryptor::decrypt("aHJyZiXvSHk=", md5("sec"));


  Files folder image Files  
File Role Description
Plain text file Cryptor.class.php Class Cryptor Class
Accessible without login Plain text file example.php Example The example file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:400
This week:0
All time:6,567
This week:571Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:70%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:2418