{"action":"created","issue":{"url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/20","repository_url":"https://api.github.com/repos/singpolyma/openpgp-php","labels_url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/20/comments","events_url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/20/events","html_url":"https://github.com/singpolyma/openpgp-php/issues/20","id":135043503,"number":20,"title":"Example for how to use asymmetric/public key encryption?","user":{"login":"meitar","id":18677,"avatar_url":"https://avatars.githubusercontent.com/u/18677?v=3","gravatar_id":"","url":"https://api.github.com/users/meitar","html_url":"https://github.com/meitar","followers_url":"https://api.github.com/users/meitar/followers","following_url":"https://api.github.com/users/meitar/following{/other_user}","gists_url":"https://api.github.com/users/meitar/gists{/gist_id}","starred_url":"https://api.github.com/users/meitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meitar/subscriptions","organizations_url":"https://api.github.com/users/meitar/orgs","repos_url":"https://api.github.com/users/meitar/repos","events_url":"https://api.github.com/users/meitar/events{/privacy}","received_events_url":"https://api.github.com/users/meitar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-02-20T07:07:13Z","updated_at":"2016-02-20T13:32:45Z","closed_at":null,"body":"I am trying to use this library for a trivial encryption using a public key and then a future decryption using the corresponding private key, but I am not sure how to do so with this library's API. I could not find an example for this (only for \"symmetric\" ciphers).\r\n\r\nI also looked through [these Doxygen docs](https://singpolyma.github.io/openpgp-php/) but they are not clear to me.\r\n\r\nCan you add an example for this case?\r\n\r\nThanks.\r\n\r\n/cc @DanielRuf meitar/wp-pgp-encrypted-emails#3"},"comment":{"url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/comments/186597035","html_url":"https://github.com/singpolyma/openpgp-php/issues/20#issuecomment-186597035","issue_url":"https://api.github.com/repos/singpolyma/openpgp-php/issues/20","id":186597035,"user":{"login":"meitar","id":18677,"avatar_url":"https://avatars.githubusercontent.com/u/18677?v=3","gravatar_id":"","url":"https://api.github.com/users/meitar","html_url":"https://github.com/meitar","followers_url":"https://api.github.com/users/meitar/followers","following_url":"https://api.github.com/users/meitar/following{/other_user}","gists_url":"https://api.github.com/users/meitar/gists{/gist_id}","starred_url":"https://api.github.com/users/meitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meitar/subscriptions","organizations_url":"https://api.github.com/users/meitar/orgs","repos_url":"https://api.github.com/users/meitar/repos","events_url":"https://api.github.com/users/meitar/events{/privacy}","received_events_url":"https://api.github.com/users/meitar/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T13:32:45Z","updated_at":"2016-02-20T13:32:45Z","body":"To be clear, this output is similar to what I get when I run the command `gpg2 --decrypt --passphrase-file /tmp/passphrase /tmp/mytest` and wherein the `/tmp/passphrase` file contains the correct passphrase for my private key, and `/tmp/mytest` contains the ASCII-armored encrypted output of the code in question, above."}}