PHP code example of gwsn / php-encrypt

1. Go to this page and download the library: Download gwsn/php-encrypt 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/ */

    

gwsn / php-encrypt example snippets



    private Encryptor $encryptor;

    public function __construct(Encryptor $encryptor)
    {
        $this->encryptor = $encryptor;
    }

    public function makeItSecret(string $content): string
    {
        return $this->encryptor->encrypt($content);
    }
    
    public function makeItReadable(string $content): string 
    {
        return $this->encryptor->decrypt($content);
    }
 bash
composer