PHP code example of davmixcool / cryptman

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

    

davmixcool / cryptman example snippets



	$cryptman = new Davmixcool\Cryptman([
		'key' => 'Your cipher key'
	]);

	//Encrypt data
	$data = 'Loose lips sink ships';
	$encrypted = $cryptman->cipher($data)->encrypt();

	//Decrypt Data
	$decrypted = $cryptman->cipher($encrypted)->decrypt();


	
	$cryptman = new Davmixcool\Cryptman([
		'key' => 'Your cipher key',
		'method' => 'Your cipher method', //see: http://php.net/openssl_get_cipher_methods for more. resolves to default menthod if none selected
	]);

	//Encrypt data
	$data = 'Loose lips sink ships';
	$encrypted = $cryptman->cipher($data)->encrypt();

	//Decrypt Data
	$decrypted = $cryptman->cipher($encrypted)->decrypt();