Fix encrypt/decrypt