PHP code example of monster / string-encrypt

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

    

monster / string-encrypt example snippets


$stringEncrypt = new \Monster\StringEncrypt();
$stringEncrypt->setKey("123456");
$base64EncodeIv = $stringEncrypt->createBase64EncodeIv();
$stringEncrypt->setIv($base64EncodeIv);
$data = $stringEncrypt->encrypt("18358274773");
$stringEncrypt->decrypt($data);