PHP code example of ksmz / gplay-encryptedpasswd
1. Go to this page and download the library: Download ksmz/gplay-encryptedpasswd 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/ */
ksmz / gplay-encryptedpasswd example snippets
use ksmz\GPEncryptedPasswd\Encrypt;
use ParagonIE\HiddenString\HiddenString;
// Fetch your credentials from somewhere else.
$gmailAddress = getenv('GOOGLE_EMAIL');
$gmailPassword = getenv('GOOGLE_PASSWORD');
// HiddenString hides sensitive information from backtraces.
// Alternatively, this can be eventually be replaced by https://wiki.php.net/rfc/redact_parameters_in_back_traces in PHP 8.2
$encryptor = new Encrypt($gmailAddress, new HiddenString($gmailPassword));
echo $encryptor->encrypt();
// AFcb4KS4dW-knb6SS_VaeZRZVqSEZK9ExPO_zt8mgDISQBuEsLYwKzO9JYzar7m2Zjy5bih4MYkb0W46NMgYy_k0ckdehb_bmxrIjlTHHyPxMHH32P8GOlNjoSkt7QgmGEi5JbmoKFfYTo-9FNOioI-7W2l-e6zrw2OhOfSlYjvp2oHM1Q==