update logic to tencryptor update