https://github.com/twitchy-ears/epa-programmatic
Quick post-work hack. I wanted something to let emacs look at what keys were in GnuPG/GPG, the epa library knew - but a quick look didn't reveal any useful programmatic querying features - the epa-list-keys function outputs a buffer which it then pops up (a little rudely).
So I wrote something to do a quick buffer parse and actually return sexps.
I'm sure the internals of epa have this already, but parsing the buffer output was faster.
