Rough implementation of the decrypt method.