Поделиться через


MSCustomProtectedData class

Provides a custom protected data object that can be used to read RMS-protected data. Use MSCustomProtectedData when reading files that are protected using a custom protected file format rather than Microsoft Protected File format. When encrypting content for files that are protected using a custom protected file format, use MSMutableCustomProtectedData For more information, see Remarks section.

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

Signature

@interface MSCustomProtectedData : MSProtectedData

Methods

Name Description
customProtectedDataWithPolicy
Asynchronously creates an MSCustomProtectedData object that can be used to decrypt the specified block of protected data.
getEncryptedContentLengthWithPolicy
Returns the size of the encrypted content.

Defined in

MSCustomProtectedData.h

Supported Platforms

Minimum supported OS versions
iOS 7.0 and OS X 10.8

Remarks

MSCustomProtectedData and its mutable subclass MSMutableCustomProtectedData 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

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.