PHP code example of tankfairies / laravel-tcrypt

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

    

tankfairies / laravel-tcrypt example snippets


'providers' => [
    Tankfairies\LaravelTcrypt\GuidServiceProvider::class,
]

$publicKey = generate_public_tkey('your_password', 'your_salt');

$encryptedMessage = tcrypt(
        'encrypt',
        'your_password',
        'your_salt',
        'my secret message',
        'the_public_key_from_the_receiver');

$decryptedMessage = tcrypt(
        'decrypt',
        'your_password',
        'your_salt',
        'the encrypted message',
        'the_public_key_from_the_sender');