PHP code example of elevenstack / gencriptor

1. Go to this page and download the library: Download elevenstack/gencriptor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elevenstack / gencriptor example snippets


     use elevenstack\Gencriptor\Gencriptor;

    $pass = new Gencriptor();
    $result = $pass->getstring_secur(8, false);

    echo $result; 
    //G1JCOT7V

     use elevenstack\Gencriptor\Gencriptor;

    $pass = new Gencriptor();
    $crypted = $pass->encString('anypass');
    echo $crypted;
    //LWVPdi1lT3Z4NEc4JVQ/SDRYa0xuRTNDeDRHOA

    $descrypted = $pass->decString('LWVPdi1lT3Z4NEc4JVQ/SDRYa0xuRTNDeDRHOA');
    echo $descrypted;
    //anypass

     use elevenstack\Gencriptor\Gencriptor;

    $pass = new Gencriptor();
    $crypted = $pass->encString('pass');
    echo $crypted; //LWVPdi1lT3Z4NEc4JVQ/SA

    $descrypted = $pass->decString('LWVPdi1lT3Z4NEc4JVQ/SA');

    if($descrypted == 'pass'){
        echo "Open access";
    }else{
        echo "Error try again";
    }