Documentation ¶
Overview ¶
Package mime provides an API to decrypt mime messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt( message []byte, messageEncoding int8, decryptionHandle crypto.PGPDecryption, verifyHandle crypto.PGPVerify, callbacks MIMECallbacks, )
Decrypt decrypts and verifies a MIME message. messageEncoding provides the encoding of the encrypted MIME message, either crypto.Bytes or crypto.Armor. The decryptionHandle is used to decrypt and verify the message, while the verifyHandle is used to verify the signature contained in the decrypted mime message. The verifyHandle can be nil.
Types ¶
type MIMECallbacks ¶
type MIMECallbacks interface { OnBody(body string, mimetype string) OnAttachment(headers string, data []byte) // Encrypted headers can be in an attachment and thus be placed at the end of the mime structure. OnEncryptedHeaders(headers string) OnVerified(verified int) OnError(err error) }
MIMECallbacks defines callback methods to process a MIME message.
Click to show internal directories.
Click to hide internal directories.