Signer for Swift Mailer - using PEAR's Crypt_GPG library for OpenPGP encryption or signing (or both) of outgoing emails.
This library extends the somewhat ubiqitious SwiftMailer package by providing a class to fit the Message Signer API to implement PGP encryption and optionally signing.
$encryptionKeyID = 'firstname.lastname@example.org'; $signer = new \Nightjar\SwiftSignerCryptGPG($encryptionKeyID); /** @var Swift_Message $swiftMessage */ $swiftMessage->attachSigner($signer);
Upon sending the message it will be encrypted as per PGP/MIME (RFC 3156)
Currently encryption is mandatory, signing is optional. This should change to provide a signing only option in the future.