Link to home
Start Free TrialLog in
Avatar of purplesoup
purplesoupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

What is the recommended C# DataType for holding credit card information?

If I just encrypt a string with a credit card number, the old unencrypted one is still hanging around for a bit until it’s garbage collected. The encryption is written to a new copy. The same issue arises if we try to overwrite the old string when done with it, i.e. the original string becomes unreferenced and new string is created for the overwrite.

I did wonder about SecureString but this discussion seems to identify issues with it:
http://stackoverflow.com/questions/27973858/c-sharp-and-removing-sensitive-data-and-all-garbage-collection-copies-from-memor 

What is the recommended way of holding credit card details in C#?
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of purplesoup

ASKER

Apparently there are issues with character arrays getting swapped to disk - but no one else answered so you can have the points.