Click here to Skip to main content
12,406,124 members (40,722 online)
   

C#

 
AnswerRe: CREATION tree usage recursive functions Pin
jibesh6-Jan-13 22:33
memberjibesh6-Jan-13 22:33 
GeneralRe: CREATION tree usage recursive functions Pin
fatima...686-Jan-13 22:40
memberfatima...686-Jan-13 22:40 
GeneralRe: CREATION tree usage recursive functions Pin
jibesh6-Jan-13 22:44
memberjibesh6-Jan-13 22:44 
AnswerRe: CREATION tree usage recursive functions Pin
Richard MacCutchan6-Jan-13 23:13
mvpRichard MacCutchan6-Jan-13 23:13 
NewsRLE encoding/decoding tool C# Pin
Oleg Orlov6-Jan-13 16:15
memberOleg Orlov6-Jan-13 16:15 
GeneralRe: RLE encoding/decoding tool C# Pin
Richard MacCutchan6-Jan-13 22:18
mvpRichard MacCutchan6-Jan-13 22:18 
GeneralRe: RLE encoding/decoding tool C# Pin
Oleg Orlov6-Jan-13 23:40
memberOleg Orlov6-Jan-13 23:40 
QuestionEncrypting XML **elements** Pin
SledgeHammer016-Jan-13 10:15
memberSledgeHammer016-Jan-13 10:15 
I have a requirement to serialize out an object to XML where certain elements are encrypted for privacy / security reasons.

I've seen some samples on the internet for doing this, but they are all hardcoded. I.e. after the object is serialized you "patch" the elements you want to encrypt with the encrypted version. Not liking the hardcoded aspect of this solution. Also having to hardcode the decryption parts.

I've seen another solution where you use the XmlIgnore attribute on the plain text property and then add an "encrypted" version of the property and use the XML attributes to rename it. Not liking that you need 2 versions of every "secure" property.

Are there any other options? Ideally I would like something "in the spirit of .NET" along the lines of:

public class SomeObject
{
      [XMLEncrypt]
      public string SomeProp { get; set; }

      public int SomeIntProp { get; set; }
}

where its something ".NETy" like a custom attribute or something like that. Unfortunately, I don't really see any way to hook into the XML serializer without completely re-writing it.

I thought about deriving a class from XMLSerializer and providing my own Serialize function that calls the base class and then afterwards goes through the object graph via reflection and patches the elements marked with the XMLEncrypt attribute, but I'm not really liking that idea that much either.

Any other suggestions?
AnswerRe: Encrypting XML **elements** Pin
Zac Greve6-Jan-13 14:12
memberZac Greve6-Jan-13 14:12 
GeneralRe: Encrypting XML **elements** Pin
SledgeHammer017-Jan-13 6:32
memberSledgeHammer017-Jan-13 6:32 
AnswerRe: Encrypting XML **elements** Pin
BobJanova7-Jan-13 5:31
memberBobJanova7-Jan-13 5:31 
GeneralRe: Encrypting XML **elements** Pin
SledgeHammer017-Jan-13 6:34
memberSledgeHammer017-Jan-13 6:34 
AnswerRe: Encrypting XML **elements** Pin
Mustafa Kok8-Jan-13 23:46
memberMustafa Kok8-Jan-13 23:46 
QuestionDelete specific matching rows in datatable Pin
Member 97041536-Jan-13 8:20
memberMember 97041536-Jan-13 8:20 
AnswerRe: Delete specific matching rows in datatable Pin
Mika Wendelius6-Jan-13 8:30
mvpMika Wendelius6-Jan-13 8:30 
GeneralRe: Delete specific matching rows in datatable Pin
Member 97041536-Jan-13 9:36
memberMember 97041536-Jan-13 9:36 
GeneralRe: Delete specific matching rows in datatable Pin
Mika Wendelius6-Jan-13 9:58
mvpMika Wendelius6-Jan-13 9:58 
GeneralRe: Delete specific matching rows in datatable Pin
Member 97041536-Jan-13 10:13
memberMember 97041536-Jan-13 10:13 
GeneralRe: Delete specific matching rows in datatable Pin
Mika Wendelius6-Jan-13 10:17
mvpMika Wendelius6-Jan-13 10:17 
GeneralRe: Delete specific matching rows in datatable Pin
Member 97041536-Jan-13 10:26
memberMember 97041536-Jan-13 10:26 
GeneralRe: Delete specific matching rows in datatable Pin
Mika Wendelius6-Jan-13 11:20
mvpMika Wendelius6-Jan-13 11:20 
GeneralRe: Delete specific matching rows in datatable Pin
Member 97041536-Jan-13 11:45
memberMember 97041536-Jan-13 11:45 
GeneralRe: Delete specific matching rows in datatable Pin
Mika Wendelius6-Jan-13 12:06
mvpMika Wendelius6-Jan-13 12:06 
QuestionRow level security with View (SQL) and how to model in Entity Frame work Pin
sarshogh_eng@yahoo.com6-Jan-13 6:56
membersarshogh_eng@yahoo.com6-Jan-13 6:56 
QuestionApplication for a dedicated PC, uncloseable Pin
Zaid Pirwani5-Jan-13 10:28
memberZaid Pirwani5-Jan-13 10:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160726.1 | Last Updated 30 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid