WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

String and Integer Encryption in PHP

Reve

New member

0

0%

Status

Offline

Posts

37

Likes

0

Rep

0

Bits

195

3

Months of Service

0%
CrypX Encryption System
Library for encrypting and decrypting strings or integers, based on PHP

Based on the openssl library

It is a simple library that allows you to encrypt and decrypt strings or integers.

How can I use it?
First, you need to create an object of the CrypX class.

Then, you can use the methods of the class.

Example:

require_once('lib.php');
$cryp = new CrypX();
$key = $cryp->randKey(16);
$iv = $cryp->randIv();
$encrypted = $cryp->encrypt("Library for encryption and decryption of strings or integers, based on PHP", $key, $iv);
$decrypted = $cryp->decrypt($encrypted, $key, $iv);

It is important to keep the key and iv to decrypt the data.

Explanation:
randKey: Generates a random key with the required bytes.
randIv: Generates a random iv.
encrypt: Encrypts the data with the key and iv.
decrypt: Decrypts the data with the key and iv.
By aexstudios

Link: https://github.com/AEX175/crypPHP
 

249

6,622

6,642

Top