Under the Hood
The nucleus of
CipherMail is the
class, which encapsulates an email message.
The other four classes of the
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 to
SMTPmanages a connection to an SMTP mail server. It can take a
Messageinstance and convert it into an outgoing email message.
Composeris a window that is used to create new
CipherMail, the main application window, keeps a list of
Messages (the in-box) and can display the contents of messages.
Of these classes,
CipherMail is the only one that
knows anything about cryptography.
message data, not caring whether its
contents are encrypted.
understand how to exchange
Messages with mail servers. And
Composer creates a new, unencrypted
. It is
CipherMail that encrypts the contents of messages
before they are sent out and decrypts their contents before they are
KeyManager to keep track of cryptographic keys.
KeyManager class is presented in Chapter 5.
Figure 11.4 shows how
objects are passed among the
class, for example, retrieves
Messages from the
Internet and passes them to
window creates a new
Message, which it gives to
CipherMail uses an
SMTP object to send the