Home Projects Techniques

"Card encrypter"

Techniques used on this project

  • python

Project description

An image of a goldfish

The card encrypter is a study in using abstract datatypes to provide a user friendly functionality. The program is divided into two seperate modules. The first module creates the deck of cards. It provides functionality you might like to have with a deck - you can pull out specific cards and insert them where you want, split and reassemble it to your liking, search for specific cards, or, naturally, shuffle the deck. This program can be used independently of the encryption module, and could for instance be used to develop card games. The encryption module, on the other hand, interacts with the deck of cards as an abstract datatype. A programmer working with this program would look at the deck module as just that - a deck of cards, and have no need to understand how it works. The encyption could just as well have been done with a physical deck of cards. The encryption itself is simple - it is an algorithm, that accepts a message, manipulates the deck according to a set of rules, converts the values of the cards to letters, which are used to encryot the message. The decryption works with the same algorithm and returns the decrypted message.