Instance Method

base64EncodedStringWithOptions:

Creates a Base64 encoded string from the string using the given options.

Declaration

- (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options;

Parameters

options

A mask that specifies options for Base-64 encoding the data. Possible values are given in NSDataBase64EncodingOptions.

Return Value

A Base64 encoded string.

Discussion

By default, no line endings are inserted.

If you specify one of the line length options (NSDataBase64Encoding64CharacterLineLength or NSDataBase64Encoding76CharacterLineLength) but don’t specify the kind of line ending to insert, the default line ending is Carriage Return + Line Feed.

See Also

Encoding and Decoding Base64 Representations

- initWithBase64EncodedData:options:

Initializes a data object with the given Base64 encoded data.

- initWithBase64Encoding:

Initializes a data object initialized with the given Base64 encoded string.

Deprecated
- initWithBase64EncodedString:options:

Initializes a data object with the given Base64 encoded string.

- base64EncodedDataWithOptions:

Creates a Base64, UTF-8 encoded data object from the string using the given options.

- base64Encoding

Initializes a Base64 encoded string from the string.

Deprecated
NSDataBase64EncodingOptions

Options for methods used to Base64 encode data.

NSDataBase64DecodingOptions

Options to modify the decoding algorithm used to decode Base64 encoded data.