• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Secure NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Secure NSString?
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: NSScanner Behavior
  • Next by Date: Cocoa and resource forks
  • Previous by thread: Re: NSScanner Behavior
  • Next by thread: Re: Secure NSString?
  • Index(es):
    • Date
    • Thread