Implement encrypt/decrypt helpers.