<?php
$res = gnupg_init();
gnupg_addencryptkey($res,"FC119CA38E25E02D0742861C584E4571596C7431");
$enc = gnupg_encrypt($res, "just a test");
echo $enc;
$plain = $gpg -> decrypt($enc);
echo $plain;
[17-Sep-2020 17:54:05 Europe/Kiev] PHP Fatal error: Uncaught Error: Call to a member function decrypt() on null in /home/tsecret1/Test-Server/GnuPG/index.php:6
Stack trace:
#0 {main}
thrown in /home/tsecret1/Test-Server/GnuPG/index.php on line 6