MSMutableCustomProtectedData class

Provides a mutable custom protected data object that can be used to encrypt a block of RMS-protected data. Use MSMutableCustomProtectedData when encrypting files that are protected using a custom protected file format rather than Microsoft Protected File format. When decrypting files that are protected using a custom protected file format, use MSCustomProtectedData.

[!Important]
RMS applications that use MSMutableCustomProtectedData may be incompatible with SharePoint, Exchange, and other RMS applications. For most applications, it is recommended that you use MSMutableProtectedData instead.

Signature

@interface MSMutableCustomProtectedData : MSMutableProtectedData

Methods

Name Description
customProtectorWithProtectionPolicy
Asynchronously creates an MSMutableCustomProtectedData object that can be used to encrypt plaintext data and write to the specified backing NSMutableData object.

Defined in

MSMutableCustomProtectedData.h

Supported Platforms

Minimum supported OS versions
iOS 7.0 and OS X 10.8

Remarks

MSMutableCustomProtectedData and its super-class MSCustomProtectedData provide data objects, object-oriented wrappers for byte buffers containing RMS-encrypted data.

These objects provide

  • automatic decryption when data is read
  • automatic encryption when data is written

These objects can be used wherever NSData and NSMutableData are required

The methods of the MSCustomProtectedData class that write data transparently encrypt the plaintext data and write the ciphertext to the backing NSMutableData object.

Data written using this class must be 16-byte aligned.

MSCustomProtectedData and MSMutableCustomProtectedData are used to read and write data for files that are protected with a custom protected file format instead of the Microsoft Protected File format. To read and write files that are protected with the Microsoft Protected File format, use MSProtectedData and MSMutableProtectedData.

Thread Safety

Members of this class are not guaranteed to be thread safe.