I am trying to find a good design pattern that will allow me to store users' private information as encrypted ciphertext yet make the encryption/decryption seamless to the user of the object.
Actually, in my class object, there are hundreds of properties. I can't manually decrypt & encrypt the property while using it. Because I will use those properties while getting a list of records, Single record for Edit and I will use those for reports generation also. For every action, I have separate methods.
It will be difficult huge lines of code if we have to decrypt each and every property in these methods, and difficult for maintenance as well.
Can anyone suggest me the best Design pattern (like attributes in C#) with sample code, It will be very helpful for me.
Aucun commentaire:
Enregistrer un commentaire