Encrypting in Python

Encrypting in Python can be very easy. Below, a snippet is provided that allows to encrypt data.

The code can be found here :

However, as the code is simple, it comes at a price: the Vigenere cipher is rather insecure. If the key length is equal to the cipher text length then the cipher is absolutely secure if the key is chosen completely randomly and is only used once. This will turn the cipher into a one time pad.

Door tom