On 28/05/2022 13.37, Fx ROOM wrote:
In any case
$ echo $GNUPGHOME
/tmp/key4656
$ mkdir /tmp/key4656
$ cat encrypt
#!/usr/bin/php
<?php
$gpg = new gnupg(); $gpg->addencryptkey("8660281B6051D071D94B5B230549F9DC851566DC");
I see you just copied the example from php.net, the fingerprint has to
belong to one of the pgp keys that is in the users default keystorage or
one that is assigned by setting the GNUPGHOME environment variable.
As you will never have the same fingerprint for the key as the one used
in the example, the example will never work.
What you need to do is to create a new pgp key with gpg and then use the fingerprint for the public key as the argument for your addencryptkey().
Also if it serves something
$ tree ~/.ssh
├── authorized_keys
├── id_rsa2
├── id_rsa.pub
└── known_hosts
No, that ain't the same as pgp keys (the above are ssl), I would suggest
you take a loot at the gpg man page, just type in your terminal: man gpg
or you can visit the following page:
https://manpages.org/gpg
--
//Aho
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)