Secure NSString?
Secure NSString?
- Subject: Secure NSString?
- From: Matthew Christensen <email@hidden>
- Date: Sun, 13 Jun 2004 14:12:03 -0400
I'm currently working on an application in which I want several text
fields to use secure strings. That is, I want to make sure that when
the strings are released, all of their data is zeroed out, so a core
dump or other glance into memory does not reveal the stored data.
My initial idea was to use categories on NSString and make sure that
the data is zeroed on dealloc. The problem there is that the internal
NSString data is not accessible, so i can't actually access or zero the
data -- or at least I can't figure out how to do this.
Another approach was to make a subclass of NSString that does this, and
set the controls to use an instance of this secure string class.
However, the problem here is that the UI controls accept strings by
value, not by reference. So once I call setStringValue on the control,
a new NSString is created somewhere else, so my deallocation is
useless.
It's certainly a head scratcher from my point of view. Does anyone have
any suggested approaches?
Thanks,
Matthew Christensen
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.