28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#import "OFSystemInfo.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
@implementation OFSecureData
+ (instancetype)dataWithCount: (size_t)count
{
return [[[self alloc] initWithCount: count] autorelease];
}
+ (instancetype)dataWithItemSize: (size_t)itemSize
count: (size_t)count
|
>
>
>
>
>
>
>
>
>
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#import "OFSystemInfo.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
@implementation OFSecureData
+ (bool)isSecure
{
#if defined(HAVE_MMAP) && defined(HAVE_MLOCK) && defined(MAP_ANON)
return true;
#else
return false;
#endif
}
+ (instancetype)dataWithCount: (size_t)count
{
return [[[self alloc] initWithCount: count] autorelease];
}
+ (instancetype)dataWithItemSize: (size_t)itemSize
count: (size_t)count
|