PHP Classes

PHP Cryptography class: Encrypt and decrypt data with different keys

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

Author

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: 23
All time rank: 84310 in Pakistan Pakistan
Week rank: 24 Up1 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 6x

Example

<?php

require_once 'classes/Cryptography.php';

$encrypt = Cryptography::encrypt('https://symfony.com/components');
$decrypt = Cryptography::decrypt($encrypt);
echo
'encypted <br>'.$encrypt;
echo
'<br> decrypted <br>'.$decrypt;


Details

PHP Cryptography class

Encypted/Decypted text/string

Feature

1. Encypted/Decypted text/string


  Files folder image Files (3)  
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 Readme.md Data Auxiliary data

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:234
This week:0
All time:8,109
This week:206Up
User Comments (1)
Thats a great class ;-)
6 years ago (José Filipe Lopes Santos)
70%StarStarStarStar