PHP Classes

File: example/index.php

Recommend this page to a friend!
  Packages of Muhammad Umer Farooq   PHP Encryption Library   example/index.php   Download  
File: example/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Encryption Library
Encrypt and decrypt data using adapter classes
Author: By
Last change: Apply fixes from StyleCI
Update index.php
Update index.php
Fix : The specific key should not have the default value #1
first
Date: 1 year ago
Size: 406 bytes
 

 

Contents

Class file image Download
<?php

    use Lablnet\Encryption;

    require '../vendor/autoload.php';

    $encryption = new Encryption('daskfasdjf432f4sd54ggfadgfs4df564asd');

    //Encrypt the message
    $encrypt = $encryption->encrypt('This is a text');

    echo 'Encrypted text: '.$encrypt;
    echo "<br\>";

    //Decrypt the message
    $decrypt = $encryption->decrypt($encrypt);
    echo 'Decrypted/plain text: '.$decrypt;