private void Content_Saving(IContentService sender, SaveEventArgs <IContent> e) { var node = e.SavedEntities.ToList(); foreach (var items in node.Where(x => x.ContentType.Alias == "example")) { string firstName = items.GetValue <string>("firstName"); //string encryptFirstName = EncryptionDecryption.EncryptString(firstName, "SupplyPassPhrase"); string encryptFirstName = EncryptionDecryption.EncryptWithNoPassPhrase(firstName); items.SetValue("firstName", encryptFirstName); sender.SaveAndPublishWithStatus(items, 0, false); } }