encrypt or decrypt objects