Made functions to encrypt and decrypt.

I made too a function to expand the key.