MSProtectedData getBytes:length:error method

Copies the specified number of plaintext bytes from the start of the receiver s data into a given buffer. Decryption is transparently performed during the execution of the method.

Signature

- (BOOL)getBytes:(void *)buffer length:(NSUInteger)length error:(NSError **)errorPtr;

Parameters

Name Datatype Notes
buffer
void *
Required. The buffer into which to copy the plaintext data.
length
NSUInteger
Required. The number of bytes to copy.
errorPtr
NSError **
Optional. If an error occurs, contains the error code and details.

Returns

Type: BOOL

YES if the operation is successful; otherwise, NO.

Defined in

MSProtectedData.h

Supported Platforms

Minimum supported OS versions
iOS 7.0 and OS X 10.8

Remarks

The specified number of bytes beginning at the start of the receiver's data are copied into the buffer. The number of bytes copied is the smaller of that specified in the length parameter and the data encapsulated in the object.

See also

MSProtectedData Class