Under the Hood
Architecture
The nucleus of CipherMail is the
Message
class, which encapsulates an email message.
The other four classes of the CipherMail
application use the Message class as follows:
POP3manages a connection to a POP3 mail server. It receives email messages from the server and converts them toMessageinstances.SMTPmanages a connection to an SMTP mail server. It can take aMessageinstance and convert it into an outgoing email message.Composeris a window that is used to create newMessages.CipherMail, the main application window, keeps a list ofMessages (the in-box) and can display the contents of messages.
Of these classes, CipherMail is the only one that
knows anything about cryptography. Message only
encapsulates
message data, not caring whether its
contents are encrypted.
POP3
and
SMTP
understand how to exchange
Messages with mail servers. And
Composer creates a new, unencrypted
Message
. It is
CipherMail that encrypts the contents of messages
before they are sent out and decrypts their contents before they are
displayed.
Like SafeTalk, CipherMail uses
a KeyManager to keep track of cryptographic keys.
The KeyManager class is presented in Chapter 5.
Figure 11.4 shows how Message
objects are passed among the
CipherMail
classes. The POP3
class, for example, retrieves Messages from the
Internet and passes them to CipherMail. The
Composer
window creates a new
Message, which it gives to
CipherMail; CipherMail uses an
SMTP object to send the Message
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access