PHP Classes

PHP Cryptography class: Encrypt and decrypt data with different keys

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 234 All time: 8,104 This week: 206Up
Version License PHP version Categories
php-cryptography-cla 1.0.0MIT/X Consortium ...5PHP 5, Cryptography


This package can encrypt and decrypt data with different keys.

It takes a given string and encrypts it with a secret key defined in the class. The result is returned after encoding it using the base64 encoding.

The class can also decrypt a previously encrypted key using the same secret key.

The class can use two possible different encryption cyphers: SHA256 and SHA512.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq is available for providing paid consulting. Contact Muhammad Umer Farooq .
Classes: 52 packages by
Country: Pakistan Pakistan
Age: 22
All time rank: 84411 in Pakistan Pakistan
Week rank: 280 Up6 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x



require_once 'classes/Cryptography.php';

$encrypt = Cryptography::encrypt('');
$decrypt = Cryptography::decrypt($encrypt);
'encypted <br>'.$encrypt;
'<br> decrypted <br>'.$decrypt;


PHP Cryptography class

Encypted/Decypted text/string


1. Encypted/Decypted text/string

  Files folder image Files  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file Data Auxiliary data

  Files folder image Files  /  classes  
File Role Description
  Plain text file Cryptography.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,104
This week:206Up
User Comments (1)
Thats a great class ;-)
5 years ago (Josť Filipe Lopes Santos)