-
Notifications
You must be signed in to change notification settings - Fork 2
/
NSDataAdditions.h
24 lines (21 loc) · 1.2 KB
/
NSDataAdditions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#import <Foundation/NSData.h>
@interface NSData (NSDataAdditions)
/*! @function +dataWithBase64EncodedString:
@discussion This method returns an autoreleased NSData object. The NSData object is initialized with the
contents of the Base 64 encoded string. This is a convenience method.
@param inBase64String An NSString object that contains only Base 64 encoded data.
@result The NSData object. */
+ (NSData *) dataWithBase64EncodedString:(NSString *) string;
/*! @function -initWithBase64EncodedString:
@discussion The NSData object is initialized with the contents of the Base 64 encoded string.
This method returns self as a convenience.
@param inBase64String An NSString object that contains only Base 64 encoded data.
@result This method returns self. */
- (id) initWithBase64EncodedString:(NSString *) string;
/*! @function -base64EncodingWithLineLength:
@discussion This method returns a Base 64 encoded string representation of the data object.
@param inLineLength A value of zero means no line breaks. This is crunched to a multiple of 4 (the next
one greater than inLineLength).
@result The base 64 encoded data. */
- (NSString *) base64EncodingWithLineLength:(unsigned int) lineLength;
@end