adding encrypt and decrypt functions. Tests passing.