Third revision

In this one, we extract the encrypt and decrypt methods and make them
into their own classes.