Unified encrypt/decrypt