root/Trunk/AIUtilities.framework/Versions/A/Headers/AIWiredData.h @ 2

Revision 2, 2.2 KB (checked in by jon, 16 years ago)

Initial commit of skeletal project.

Line 
1/*-------------------------------------------------------------------------------------------------------*\
2| Adium, Copyright (C) 2001-2005, Adam Iser  (adamiser@mac.com | http://www.adiumx.com)                   |
3\---------------------------------------------------------------------------------------------------------/
4 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU
5 | General Public License as published by the Free Software Foundation; either version 2 of the License,
6 | or (at your option) any later version.
7 |
8 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
10 | Public License for more details.
11 |
12 | You should have received a copy of the GNU General Public License along with this program; if not,
13 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
14 \------------------------------------------------------------------------------------------------------ */
15//
16//  AIWiredData.h
17//  AIUtilities.framework
18//
19//  Created by Mac-arena the Bored Zo on 2005-02-15.
20//
21
22#import <Cocoa/Cocoa.h>
23
24/*!     @class AIWiredData AIWiredData.h <AIUtilities/AIWiredData.h>
25 *      @brief A concrete, immutable subclass of NSData that uses wired memory for its backing.
26 *
27 *      @par
28 *      When storing passwords, you do not want the password to be paged out to disk, where it could be obtained using data-recovery techniques (e.g. DriveSavers).
29 *      Memory that has been "wired" cannot be paged out to disk. Therefore wired memory should be used for short-term storage of passwords.
30 *      This class stores bytes in a wired backing, so that they will not be paged to disk.
31 *      The AIWiredData instance itself may still be paged out, but this is of no value after the machine has been shut down (e.g. to remove the HDD to search it), because the secret information will no longer be in memory.
32 *
33 *      @par
34 *      Note: Does not yet conform to \c NSCopying. Use \c -subdataWithRange: instead for now.
35 *
36 *      @see AIWiredString
37 */
38
39@interface AIWiredData: NSData
40{
41        void *backing;
42        size_t length;
43}
44
45@end
Note: See TracBrowser for help on using the browser.