Microsoft Information Protection SDK - C 1.17
API Reference Documentation for C
Loading...
Searching...
No Matches
protection_handler_cc.h
Go to the documentation of this file.
1/*
2*
3* Copyright (c) Microsoft Corporation.
4* All rights reserved.
5*
6* This code is licensed under the MIT License.
7*
8* Permission is hereby granted, free of charge, to any person obtaining a copy
9* of this software and associated documentation files(the "Software"), to deal
10* in the Software without restriction, including without limitation the rights
11* to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12* copies of the Software, and to permit persons to whom the Software is
13* furnished to do so, subject to the following conditions :
14*
15* The above copyright notice and this permission notice shall be included in
16* all copies or substantial portions of the Software.
17*
18* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24* THE SOFTWARE.
25*
26*/
33#ifndef API_MIP_PROTECTION_PROTECTION_HANDLER_CC_H_
34#define API_MIP_PROTECTION_PROTECTION_HANDLER_CC_H_
35
36#include <stdint.h>
37
39#include "mip_cc/error_cc.h"
42#include "mip_cc/result_cc.h"
44
48
56
66MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionHandlerPublishingSettings(
70
80MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetIsDeprecatedAlgorithmPreferred(
84
94MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetIsAuditedExtractionAllowed(
98
108MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetIsPublishingFormatJson(
112
124MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetDelegatedUserEmail(
128
140MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetPreLicenseUserEmail(
144
145
156MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetApplicationScenarioId(
160
170MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerPublishingSettings_SetCustomSettings(
174
185MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionHandlerConsumptionSettings(
186 const uint8_t* publishingLicenseBuffer,
190
203MIP_CC_API(mip_cc_result) MIP_CC_CreateProtectionHandlerConsumptionSettingsWithPreLicense(
204 const uint8_t* preLicenseBuffer,
205 const int64_t preLicenseBufferSize,
207 const int64_t publishingLicenseBufferSize,
210
224MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_SetIsOfflineOnly(
226 const bool isOfflineOnly,
228
240MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_SetDelegatedUserEmail(
242 const char* delegatedUserEmail,
244
255MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_SetApplicationScenarioId(
257 const char* applicationScenarioId,
259
269MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_SetCustomSettings(
273
283MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetSerializedPublishingLicenseSize(
287
302MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetSerializedPublishingLicense(
305 const int64_t publishingLicenseBufferSize,
308
319MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetSerializedPreLicenseSize(
322 int64_t* preLicenseBufferSize,
324
340MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetSerializedPreLicense(
344 const int64_t preLicenseBufferSize,
347
357MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetProtectionDescriptor(
361
373MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetRights(
377
391MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetProtectedContentSize(
393 const int64_t unprotectedSize,
397
407MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetBlockSize(
409 int64_t* blockSize,
411
421MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetIssuedUserSize(
425
440MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetIssuedUser(
443 const int64_t issuedUserBufferSize,
446
456MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetOwnerSize(
458 int64_t* ownerSize,
460
475MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetOwner(
478 const int64_t ownerBufferSize,
481
494MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetContentId(
498
508MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_DoesUseDeprecatedAlgorithm(
512
527MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_EncryptBuffer(
529 const int64_t offsetFromStart,
530 const uint8_t* inputBuffer,
531 const int64_t inputBufferSize,
532 uint8_t* outputBuffer,
533 const int64_t outputBufferSize,
534 const bool isFinal,
537
552MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_DecryptBuffer(
554 const int64_t offsetFromStart,
555 const uint8_t* inputBuffer,
556 const int64_t inputBufferSize,
557 uint8_t* outputBuffer,
558 const int64_t outputBufferSize,
559 const bool isFinal,
562
572MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandler_GetCipherMode(
576
582MIP_CC_API(void) MIP_CC_ReleaseProtectionHandlerPublishingSettings(mip_cc_protection_handler_publishing_settings settings);
583
589MIP_CC_API(void) MIP_CC_ReleaseProtectionHandlerConsumptionSettings(mip_cc_protection_handler_consumption_settings settings);
590
600MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_AddRmsCapability(
601 const mip_cc_protection_handler_consumption_settings consumptionSettings,
602 const char* capability,
604
615MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_RemoveRmsCapability(
616 const mip_cc_protection_handler_consumption_settings consumptionSettings,
617 const char* capability,
618 bool* removed,
620
633MIP_CC_API(mip_cc_result) MIP_CC_ProtectionHandlerConsumptionSettings_GetRmsCapability (
634 const mip_cc_protection_handler_consumption_settings consumptionSettings,
637
643MIP_CC_API(void) MIP_CC_ReleaseProtectionHandler(mip_cc_protection_handler handler);
644#endif // API_MIP_PROTECTION_PROTECTION_HANDLER_CC_H_
A file Containing the common types used by the upe, file and protection modules.
Error definition and functions.
Defines C-Style crypto types.
mip_cc_cipher_mode
Cipher mode identifier.
Definition protection_crypto_types_cc.h:40
Defines C-Style ProtectionDescriptor interface.
const mip_cc_protection_handler_publishing_settings const void mip_cc_protection_handler * handler
Definition protection_engine_cc.h:78
mip_cc_protection_handler_publishing_settings mip_cc_error * errorInfo
Definition protection_handler_cc.h:69
const int64_t const uint8_t const int64_t uint8_t const int64_t const bool isFinal
Definition protection_handler_cc.h:534
const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t * actualDecryptedSize
Definition protection_handler_cc.h:560
char const int64_t issuedUserBufferSize
Definition protection_handler_cc.h:443
const char bool * removed
Definition protection_handler_cc.h:618
const int64_t const uint8_t * inputBuffer
Definition protection_handler_cc.h:530
char const int64_t int64_t * actualIssuedUserSize
Definition protection_handler_cc.h:444
mip_cc_protection_descriptor * descriptor
Definition protection_handler_cc.h:359
const int64_t publishingLicenseBufferSize
Definition protection_handler_cc.h:187
const int64_t offsetFromStart
Definition protection_handler_cc.h:529
mip_cc_guid * contentId
Definition protection_handler_cc.h:496
char const int64_t int64_t * actualOwnerSize
Definition protection_handler_cc.h:479
mip_cc_protection_handler_publishing_settings * settings
Definition protection_handler_cc.h:68
const bool isDeprecatedAlgorithmPreferred
Definition protection_handler_cc.h:82
mip_cc_pre_license_format uint8_t * preLicenseBuffer
Definition protection_handler_cc.h:343
const int64_t const bool includesFinalBlock
Definition protection_handler_cc.h:394
mip_cc_pre_license_format format
Definition protection_handler_cc.h:321
const int64_t const uint8_t const int64_t uint8_t const int64_t outputBufferSize
Definition protection_handler_cc.h:533
int64_t * issuedUserSize
Definition protection_handler_cc.h:423
const bool isPublishingFormatJson
Definition protection_handler_cc.h:110
const int64_t const uint8_t * publishingLicenseBuffer
Definition protection_handler_cc.h:206
const int64_t const uint8_t const int64_t uint8_t * outputBuffer
Definition protection_handler_cc.h:532
mip_cc_handle * mip_cc_protection_handler_consumption_settings
Definition protection_handler_cc.h:47
mip_cc_pre_license_format
Defines pre-license format.
Definition protection_handler_cc.h:52
@ MIP_PRE_LICENSE_FORMAT_JSON
Definition protection_handler_cc.h:54
@ MIP_PRE_LICENSE_FORMAT_XML
Definition protection_handler_cc.h:53
uint8_t const int64_t int64_t * actualPublishingLicenseSize
Definition protection_handler_cc.h:306
mip_cc_handle * mip_cc_protection_handler_publishing_settings
Definition protection_handler_cc.h:46
const mip_cc_dictionary customSettings
Definition protection_handler_cc.h:172
mip_cc_string_list * capabilities
Definition protection_handler_cc.h:635
const char * delegatedUserEmail
Definition protection_handler_cc.h:126
int64_t * ownerSize
Definition protection_handler_cc.h:458
char * ownerBuffer
Definition protection_handler_cc.h:477
const int64_t const uint8_t const int64_t uint8_t const int64_t const bool int64_t * actualEncryptedSize
Definition protection_handler_cc.h:535
const char * applicationScenarioId
Definition protection_handler_cc.h:158
mip_cc_pre_license_format uint8_t const int64_t int64_t * actualPreLicenseSize
Definition protection_handler_cc.h:345
const char * preLicenseUserEmail
Definition protection_handler_cc.h:142
const int64_t unprotectedSize
Definition protection_handler_cc.h:393
MIP_CC_API(void) MIP_CC_ReleaseProtectionHandlerPublishingSettings(mip_cc_protection_handler_publishing_settings settings)
Release resources associated with a protection handler settings.
bool * doesUseDeprecatedAlgorithm
Definition protection_handler_cc.h:510
int64_t * blockSize
Definition protection_handler_cc.h:409
const int64_t const uint8_t const int64_t inputBufferSize
Definition protection_handler_cc.h:531
mip_cc_string_list * rights
Definition protection_handler_cc.h:375
const bool isAuditedExtractionAllowed
Definition protection_handler_cc.h:96
mip_cc_handle * mip_cc_protection_handler
Definition protection_handler_cc.h:45
mip_cc_cipher_mode * cipherMode
Definition protection_handler_cc.h:574
char * issuedUserBuffer
Definition protection_handler_cc.h:442
const int64_t preLicenseBufferSize
Definition protection_handler_cc.h:205
const int64_t const bool int64_t * protectedSize
Definition protection_handler_cc.h:395
char const int64_t ownerBufferSize
Definition protection_handler_cc.h:478
const char * capability
Definition protection_handler_cc.h:602
const bool isOfflineOnly
Definition protection_handler_cc.h:226
Defines success/error result codes.
mip_cc_result
API success/failure result.
Definition result_cc.h:44
Contains C API definitions for common string list.
Error information.
Definition error_cc.h:79
GUID.
Definition common_types_cc.h:52
Opaque handle to MIP object.
Definition common_types_cc.h:44