Hi, I've been working with your library! Great Job, I really like it. I'd like to ask if it is possible to add private encryption and public decryption.
For example
public function encrypt($data)
{
if ($this->privateKeyFile === null) {
throw new Exception("Unable to encrypt: No private key provided.");
}
$privateKey = openssl_pkey_get_private($this->privateKeyFile, $this->password);
if (!$privateKey) {
throw new Exception("OpenSSL: Unable to get private key for encryption");
}
$success = openssl_private_encrypt($data, $encryptedData, $privateKey);
openssl_free_key($privateKey);
if (!$success) {
throw new Exception("Encryption failed. Ensure you are using (1) A PRIVATE key, and (2) the correct one.");
}
return $encryptedData;
}
I'm using it with Laravel Lumen, as soon as I learn how, I'd like to make a package for laravel
Hi, I've been working with your library! Great Job, I really like it. I'd like to ask if it is possible to add private encryption and public decryption.
For example
I'm using it with Laravel Lumen, as soon as I learn how, I'd like to make a package for laravel
Cheers