Added support for encrypted data if is_crypto is set to 1 during initialization of the model. Should probably find a better way to do this...