Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
protection_handler_cc.h File Reference

Defines C-Style ProtectionHandler interface. More...

+ Include dependency graph for protection_handler_cc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef mip_cc_handlemip_cc_protection_handler
 
typedef mip_cc_handlemip_cc_protection_handler_consumption_settings
 
typedef mip_cc_handlemip_cc_protection_handler_publishing_settings
 

Enumerations

enum  mip_cc_pre_license_format {
  MIP_PRE_LICENSE_FORMAT_XML = 0 ,
  MIP_PRE_LICENSE_FORMAT_JSON = 1
}
 Defines pre-license format. More...
 

Functions

 MIP_CC_API (mip_cc_result) MIP_CC_CreateProtectionHandlerPublishingSettings(const mip_cc_protection_descriptor descriptor
 Create a settings object used to create a protection handler for publishing new content.
 
 MIP_CC_API (void) MIP_CC_ReleaseProtectionHandlerPublishingSettings(mip_cc_protection_handler_publishing_settings settings)
 Release resources associated with a protection handler settings.
 

Variables

const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t * actualDecryptedSize
 
const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t * actualEncryptedSize
 
char const int64_t int64_t * actualIssuedUserSize
 
char const int64_t int64_t * actualOwnerSize
 
mip_cc_pre_license_format uint8_t const int64_t int64_t * actualPreLicenseSize
 
uint8_t const int64_t int64_t * actualPublishingLicenseSize
 
const char * applicationScenarioId
 
int64_t * blockSize
 
mip_cc_string_listcapabilities
 
const char * capability
 
mip_cc_cipher_modecipherMode
 
mip_cc_guidcontentId
 
const mip_cc_dictionary customSettings
 
const char * delegatedUserEmail
 
mip_cc_protection_descriptordescriptor
 
bool * doesUseDeprecatedAlgorithm
 
mip_cc_protection_handler_publishing_settings mip_cc_errorerrorInfo
 
mip_cc_pre_license_format format
 
const int64_t const bool includesFinalBlock
 
const int64_t const uint8_t * inputBuffer
 
const int64_t const uint8_t const int64_t inputBufferSize
 
const bool isAuditedExtractionAllowed
 
const bool isDeprecatedAlgorithmPreferred
 
const int64_t const uint8_t const int64_t uint8_t const int64_t const bool isFinal
 
const bool isOfflineOnly
 
const bool isPublishingFormatJson
 
char * issuedUserBuffer
 
char const int64_t issuedUserBufferSize
 
int64_t * issuedUserSize
 
const int64_t offsetFromStart
 
const int64_t const uint8_t const int64_t uint8_t * outputBuffer
 
const int64_t const uint8_t const int64_t uint8_t const int64_t outputBufferSize
 
char * ownerBuffer
 
char const int64_t ownerBufferSize
 
int64_t * ownerSize
 
mip_cc_pre_license_format uint8_t * preLicenseBuffer
 
const int64_t preLicenseBufferSize
 
const char * preLicenseUserEmail
 
const int64_t const bool int64_t * protectedSize
 
const int64_t const uint8_t * publishingLicenseBuffer
 
const int64_t publishingLicenseBufferSize
 
const char bool * removed
 
mip_cc_string_listrights
 
mip_cc_protection_handler_publishing_settingssettings
 
const int64_t unprotectedSize
 

Detailed Description

Defines C-Style ProtectionHandler interface.

Definition in file protection_handler_cc.h.

Typedef Documentation

◆ mip_cc_protection_handler

Definition at line 45 of file protection_handler_cc.h.

◆ mip_cc_protection_handler_consumption_settings

◆ mip_cc_protection_handler_publishing_settings

Enumeration Type Documentation

◆ mip_cc_pre_license_format

Defines pre-license format.

Enumerator
MIP_PRE_LICENSE_FORMAT_XML 

Legacy XML/SOAP format used by MSIPC.

MIP_PRE_LICENSE_FORMAT_JSON 

JSON/REST format used by MIP SDK and RMS SDK.

Definition at line 52 of file protection_handler_cc.h.

52 {
53 MIP_PRE_LICENSE_FORMAT_XML = 0, /**< Legacy XML/SOAP format used by MSIPC */
54 MIP_PRE_LICENSE_FORMAT_JSON = 1, /**< JSON/REST format used by MIP SDK and RMS SDK */
mip_cc_pre_license_format
Defines pre-license format.
@ MIP_PRE_LICENSE_FORMAT_JSON
JSON/REST format used by MIP SDK and RMS SDK.
@ MIP_PRE_LICENSE_FORMAT_XML
Legacy XML/SOAP format used by MSIPC.

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Create a settings object used to create a protection handler for publishing new content.

Gets the set of supported capabilities being passed to RMS.

Remove a capability from the set of capabilities supported when calling RMS.

Add a capability to the set of capabilities supported when calling RMS.

Gets the cipher mode of the protection handler.

Decrypt a buffer.

Encrypt a buffer.

Gets whether or not protection handler uses deprecated crypto algorithm (ECB) for backwards compatibility.

Gets the content IE of protected content.

Gets the owner of protected content.

Gets size of buffer required to store the owner of protected content.

Gets the user that has been granted access to protected content.

Gets size of buffer required to store user that has been granted access to protected content.

Gets the block size (in bytes) for the cipher mode used by a protection handler.

Calculates size of protected content, factoring in padding, etc.

Gets list of rights granted to a user.

Gets protection descriptor.

Gets pre-license.

Gets size of pre-license (in bytes)

Gets publishing license.

Gets size of publishing license (in bytes)

Sets whether or not protection handler creation permits online HTTP operations.

Create a settings object used to create a protection handler for consuming existing content.

Configures custom settings, used for feature gating and testing.

Sets application scenario Id.

Sets pre-license user.

Sets delegated user.

Sets whether or not PL is in JSON format (default is XML)

Sets whether or not non-MIP-aware applications are allowed to open protected content.

Sets whether or not deprecated crypto algorithm (ECB) is preferred for backwards compatibility.

Parameters
descriptorProtection details
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
isDeprecatedAlgorithmPreferredWhether or not deprecated algorithm is preferred
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
isAuditedExtractionAllowedWhether or not non-MIP-aware applications are allowed to open protected content
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
isPublishingFormatJsonWhether or not resulting PL should be in JSON format
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
delegatedUserEmailEmail address of delegated user
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
A delegated user is specified when the authenticating user/application is acting on behalf of another user
Parameters
settingsProtection handler settings
preLicenseUserEmailEmail address of pre-license user
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
A pre-license user is specified when a pre-license should be fetched when publishing
Parameters
settingsProtection handler settings
applicationScenarioIdapplication scenario Id
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
customSettingsKey/value pairs of custom settings
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
publishingLicenseBufferBuffer containing raw publishing license
publishingLicenseBufferSizeSize of publishing license buffer
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
preLicenseBufferBuffer containing raw pre license buffer
preLicenseBufferSizeSize of pre license buffer
publishingLicenseBufferBuffer containing raw publishing license
publishingLicenseBufferSizeSize of publishing license buffer
settings[Output] Newly-created settings instance
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
settingsProtection handler settings
isOfflineOnlyTrue if HTTP operations are forbidden, else false
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If this is set to true, protection handler creation will only succeed if content has already been previously decrypted and its unexpired license is cached. A MIP_RESULT_ERROR_NETWORK result will be returned if cached content is not found.
Parameters
handlerHandler representing protected content
publishingLicenseBufferSize[Output] Size of publishing license (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
publishingLicenseBuffer[Output] Buffer to which publishing license will be written
publishingLicenseBufferSizeSize of publishing license buffer
actualPublishingLicenseSize[Output] Actual size of publishing license (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If publishingLicenseBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualPublishingLicenseSize will be set to the minimum required buffer size.
Parameters
handlerHandler representing protected content
formatPre-license format
preLicenseBufferSize[Output] Size of pre-license (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
formatPre-license format
preLicenseBuffer[Output] Buffer to which pre-license will be written
preLicenseBufferSizeSize of pre-license buffer
actualPreLicenseSize[Output] Actual size of pre-license (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If preLicenseBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualPreLicenseSize will be set to the minimum required buffer size.
Parameters
handlerHandler representing protected content
descriptor[Output] Protection descriptor
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
rights[Output] List of rights granted to a user, memory owned by caller
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The 'rights' variable must be released by the caller by calling MIP_CC_ReleaseStringList
Parameters
handlerHandler representing protected content
unprotectedSizeSize of unprotected/cleartext content (in bytes)
includesFinalBlockDescribes if the unprotected content in question includes the final block or not. For example, in CBC4k encryption mode, non-final protected blocks are the same size as unprotected blocks, but final protected blocks are larger than their unprotected counterparts.
protectedSize[Output] Size of protected content
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
blockSize[Output] Block size (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
issuedUserSize[Output] Size of buffer to hold issued user (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
issuedUserBuffer[Output] Buffer the issued user will be copied into.
issuedUserBufferSizeSize (in number of chars) of the issuedUserBuffer.
actualIssuedUserSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If issuedUserBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualIssuedUserSize will be set to the minimum required buffer size.
Parameters
handlerHandler representing protected content
ownerSize[Output] Size of buffer to hold issued user (in number of chars)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
ownerBuffer[Output] Buffer the issued user will be copied into.
ownerBufferSizeSize (in number of chars) of the ownerBuffer.
actualOwnerSize[Output] Number of chars written to the buffer
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
If ownerBuffer is null or insufficient, MIP_RESULT_ERROR_INSUFFICIENT_BUFFER will be returned and actualOwnerSize will be set to the minimum required buffer size.
Parameters
handlerHandler representing protected content
contentId[Output] Content ID
errorInfo[Output] (Optional) Failure info if operation result is error
Note
Publishing licenses will have this identifier surrounded by curly braces "{}". Those braces are removed from the value stored in contentId
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
doesUseDeprecatedAlgorithm[Output] Whether or not protection handler uses deprecated crypto algorithm
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
offsetFromStartRelative position of inputBuffer from the very beginning of the cleartext content
inputBufferBuffer of cleartext content that will be encrypted
inputBufferSizeSize (in bytes) of input buffer
outputBuffer[Output] Buffer into which encrypted content will be copied
outputBufferSizeSize (in bytes) of output buffer
isFinalIf input buffer contains the final cleartext bytes or not
actualEncryptedSize[Output] Actual size of encrypted content (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
offsetFromStartRelative position of inputBuffer from the very beginning of the encrypted content
inputBufferBuffer of encrypted content that will be decrypted
inputBufferSizeSize (in bytes) of input buffer
outputBuffer[Output] Buffer into which decrypted content will be copied
outputBufferSizeSize (in bytes) of output buffer
isFinalIf input buffer contains the final encrypted bytes or not
actualDecryptedSize[Output] Actual size of encrypted content (in bytes)
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
handlerHandler representing protected content
cipherMode[Output] The cipher mode
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
consumptionSettingsConsumption handler settings
capabilityThe capability to add to indicate a supported feature to RMS
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
consumptionSettingsConsumption handler settings
capabilityThe capability to remove from the supported features in RMS
removed[Output] A boolean indiciating if the supplied capability was removed.
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
consumptionSettingsConsumption handler settings
capabilities[Output] Gets the list of capabilities being passed to RMS
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Note
The returned 'capabilities' (mip_cc_string_list*) must be freed by calling MIP_CC_ReleaseStringList.

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with a protection handler settings.

Release resources associated with a protection handler.

Parameters
settingsProtection handler settings to be released
handlerProtection handler to be released

Variable Documentation

◆ actualDecryptedSize

const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t* actualDecryptedSize

Definition at line 560 of file protection_handler_cc.h.

◆ actualEncryptedSize

const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t* actualEncryptedSize

Definition at line 535 of file protection_handler_cc.h.

◆ actualIssuedUserSize

char const int64_t int64_t* actualIssuedUserSize

Definition at line 444 of file protection_handler_cc.h.

◆ actualOwnerSize

char const int64_t int64_t* actualOwnerSize

Definition at line 479 of file protection_handler_cc.h.

◆ actualPreLicenseSize

mip_cc_pre_license_format uint8_t const int64_t int64_t* actualPreLicenseSize

Definition at line 345 of file protection_handler_cc.h.

◆ actualPublishingLicenseSize

uint8_t const int64_t int64_t* actualPublishingLicenseSize

Definition at line 306 of file protection_handler_cc.h.

◆ applicationScenarioId

const char * applicationScenarioId

Definition at line 158 of file protection_handler_cc.h.

◆ blockSize

int64_t* blockSize

Definition at line 409 of file protection_handler_cc.h.

◆ capabilities

mip_cc_string_list* capabilities

Definition at line 635 of file protection_handler_cc.h.

◆ capability

const char* capability

Definition at line 602 of file protection_handler_cc.h.

◆ cipherMode

mip_cc_cipher_mode* cipherMode

Definition at line 574 of file protection_handler_cc.h.

◆ contentId

mip_cc_guid* contentId

Definition at line 496 of file protection_handler_cc.h.

◆ customSettings

const mip_cc_dictionary customSettings

Definition at line 172 of file protection_handler_cc.h.

◆ delegatedUserEmail

const char* delegatedUserEmail

Definition at line 126 of file protection_handler_cc.h.

◆ descriptor

Definition at line 359 of file protection_handler_cc.h.

◆ doesUseDeprecatedAlgorithm

bool* doesUseDeprecatedAlgorithm

Definition at line 510 of file protection_handler_cc.h.

◆ errorInfo

Definition at line 69 of file protection_handler_cc.h.

◆ format

Definition at line 321 of file protection_handler_cc.h.

◆ includesFinalBlock

const int64_t const bool includesFinalBlock

Definition at line 394 of file protection_handler_cc.h.

◆ inputBuffer

const int64_t const uint8_t * inputBuffer

Definition at line 530 of file protection_handler_cc.h.

◆ inputBufferSize

const int64_t const uint8_t const int64_t inputBufferSize

Definition at line 531 of file protection_handler_cc.h.

◆ isAuditedExtractionAllowed

const bool isAuditedExtractionAllowed

Definition at line 96 of file protection_handler_cc.h.

◆ isDeprecatedAlgorithmPreferred

const bool isDeprecatedAlgorithmPreferred

Definition at line 82 of file protection_handler_cc.h.

◆ isFinal

const int64_t const uint8_t const int64_t uint8_t const int64_t const bool isFinal

Definition at line 534 of file protection_handler_cc.h.

◆ isOfflineOnly

const bool isOfflineOnly

Definition at line 226 of file protection_handler_cc.h.

◆ isPublishingFormatJson

const bool isPublishingFormatJson

Definition at line 110 of file protection_handler_cc.h.

◆ issuedUserBuffer

char* issuedUserBuffer

Definition at line 442 of file protection_handler_cc.h.

◆ issuedUserBufferSize

char const int64_t issuedUserBufferSize

Definition at line 443 of file protection_handler_cc.h.

◆ issuedUserSize

int64_t* issuedUserSize

Definition at line 423 of file protection_handler_cc.h.

◆ offsetFromStart

const int64_t offsetFromStart

Definition at line 529 of file protection_handler_cc.h.

◆ outputBuffer

const int64_t const uint8_t const int64_t uint8_t * outputBuffer

Definition at line 532 of file protection_handler_cc.h.

◆ outputBufferSize

const int64_t const uint8_t const int64_t uint8_t const int64_t outputBufferSize

Definition at line 533 of file protection_handler_cc.h.

◆ ownerBuffer

char* ownerBuffer

Definition at line 477 of file protection_handler_cc.h.

◆ ownerBufferSize

char const int64_t ownerBufferSize

Definition at line 478 of file protection_handler_cc.h.

◆ ownerSize

int64_t* ownerSize

Definition at line 458 of file protection_handler_cc.h.

◆ preLicenseBuffer

mip_cc_pre_license_format uint8_t* preLicenseBuffer

Definition at line 343 of file protection_handler_cc.h.

◆ preLicenseBufferSize

mip_cc_pre_license_format uint8_t const int64_t preLicenseBufferSize

Definition at line 205 of file protection_handler_cc.h.

◆ preLicenseUserEmail

const char* preLicenseUserEmail

Definition at line 142 of file protection_handler_cc.h.

◆ protectedSize

const int64_t const bool int64_t* protectedSize

Definition at line 395 of file protection_handler_cc.h.

◆ publishingLicenseBuffer

uint8_t * publishingLicenseBuffer

Definition at line 206 of file protection_handler_cc.h.

◆ publishingLicenseBufferSize

uint8_t const int64_t publishingLicenseBufferSize

Definition at line 187 of file protection_handler_cc.h.

◆ removed

const char bool* removed

Definition at line 618 of file protection_handler_cc.h.

◆ rights

Definition at line 375 of file protection_handler_cc.h.

◆ settings

const int64_t const uint8_t const int64_t mip_cc_protection_handler_consumption_settings* settings

Definition at line 68 of file protection_handler_cc.h.

◆ unprotectedSize

const int64_t unprotectedSize

Definition at line 393 of file protection_handler_cc.h.