22OF_ASSUME_NONNULL_BEGIN
36OF_SUBCLASSING_RESTRICTED
39 unsigned char *_Nullable _items;
40 size_t _count, _itemSize;
41 bool _freeWhenDone, _allowsSwappableMemory;
56@property (readonly, nonatomic)
void *
mutableItems OF_RETURNS_INNER_POINTER;
70+ (void)preallocateUnswappableMemoryWithSize: (
size_t)size;
81+ (instancetype)dataWithCount: (
size_t)count
82 allowsSwappableMemory: (
bool)allowsSwappableMemory;
94+ (instancetype)dataWithCount: (
size_t)count
95 itemSize: (
size_t)itemSize
96 allowsSwappableMemory: (
bool)allowsSwappableMemory;
98+ (instancetype)dataWithItems: (const
void *)items
99 count: (
size_t)count OF_UNAVAILABLE;
100+ (instancetype)dataWithItems: (const
void *)items
102 itemSize: (
size_t)itemSize OF_UNAVAILABLE;
103+ (instancetype)dataWithItemsNoCopy: (
void *)items
105 freeWhenDone: (
bool)freeWhenDone OF_UNAVAILABLE;
106+ (instancetype)dataWithItemsNoCopy: (
void *)items
108 itemSize: (
size_t)itemSize
109 freeWhenDone: (
bool)freeWhenDone OF_UNAVAILABLE;
111+ (instancetype)dataWithContentsOfFile: (
OFString *)path OF_UNAVAILABLE;
113+ (instancetype)dataWithContentsOfIRI: (
OFIRI *)IRI OF_UNAVAILABLE;
114+ (instancetype)dataWithStringRepresentation: (
OFString *)string OF_UNAVAILABLE;
115+ (instancetype)dataWithBase64EncodedString: (
OFString *)string OF_UNAVAILABLE;
126- (instancetype)initWithCount: (
size_t)count
127 allowsSwappableMemory: (
bool)allowsSwappableMemory;
139- (instancetype)initWithCount: (
size_t)count
140 itemSize: (
size_t)itemSize
141 allowsSwappableMemory: (
bool)allowsSwappableMemory
142 OF_DESIGNATED_INITIALIZER;
144- (instancetype)
init OF_UNAVAILABLE;
145- (instancetype)initWithItemSize: (
size_t)itemSize OF_UNAVAILABLE;
146- (instancetype)initWithItems: (const
void *)items
147 count: (
size_t)count OF_UNAVAILABLE;
148- (instancetype)initWithItems: (const
void *)items
150 itemSize: (
size_t)itemSize OF_UNAVAILABLE;
151- (instancetype)initWithItemsNoCopy: (
void *)items
153 freeWhenDone: (
bool)freeWhenDone OF_UNAVAILABLE;
154- (instancetype)initWithItemsNoCopy: (
void *)items
156 itemSize: (
size_t)itemSize
157 freeWhenDone: (
bool)freeWhenDone OF_UNAVAILABLE;
159- (instancetype)initWithContentsOfFile: (
OFString *)path OF_UNAVAILABLE;
161- (instancetype)initWithContentsOfIRI: (
OFIRI *)IRI OF_UNAVAILABLE;
162- (instancetype)initWithStringRepresentation: (
OFString *)string OF_UNAVAILABLE;
163- (instancetype)initWithBase64EncodedString: (
OFString *)string OF_UNAVAILABLE;
174- (
void *)mutableItemAtIndex: (
size_t)index OF_RETURNS_INNER_POINTER;
185- (bool)isEqual: (nullable
id)object;
195- (void)writeToFile: (
OFString *)path OF_UNAVAILABLE;
197- (void)writeToIRI: (
OFIRI *)IRI OF_UNAVAILABLE;
A class for storing arbitrary data in an array.
Definition OFData.h:46
OFString * stringRepresentation
The string representation of the data.
Definition OFData.m:612
instancetype init()
Initializes an already allocated OFData to be empty with an item size of 1.
Definition OFData.m:217
OFString * stringByBase64Encoding
A string containing the data in Base64 encoding.
Definition OFData.m:626
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:41
A class for storing arbitrary data in secure (non-swappable) memory, securely wiping it when it gets ...
Definition OFSecureData.h:38
void zero()
Zeroes the data.
Definition OFSecureData.m:584
bool allowsSwappableMemory
Whether the data may be stored in swappable memory.
Definition OFSecureData.h:48
void * mutableItems
All items of the OFSecureData as a C array.
Definition OFSecureData.m:571
A class for handling strings.
Definition OFString.h:143
OFData * messagePackRepresentation
The MessagePack representation of the object as OFData.
Definition OFMessagePackRepresentation.h:37