|
Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
|
Manages protection-related actions for a specific protection configuration. More...
#include <protection_handler.h>
Classes | |
| class | ConsumptionSettings |
| Settings used to create a ProtectionHandler to consume existing content. More... | |
| class | Observer |
| Interface that receives notifications related to ProtectionHandler. More... | |
| class | PublishingSettings |
| Settings used to create a ProtectionHandler to protect new content. More... | |
Public Types | |
| enum class | PreLicenseFormat { Xml , Json } |
| Pre-license format. More... | |
Public Member Functions | |
| virtual std::shared_ptr< Stream > | CreateProtectedStream (const std::shared_ptr< Stream > &backingStream, int64_t contentStartPosition, int64_t contentSize)=0 |
| Create a protected stream that will allow for encryption/decryption of content. | |
| virtual int64_t | EncryptBuffer (int64_t offsetFromStart, const uint8_t *inputBuffer, int64_t inputBufferSize, uint8_t *outputBuffer, int64_t outputBufferSize, bool isFinal)=0 |
| Encrypt a buffer. | |
| virtual int64_t | DecryptBuffer (int64_t offsetFromStart, const uint8_t *inputBuffer, int64_t inputBufferSize, uint8_t *outputBuffer, int64_t outputBufferSize, bool isFinal)=0 |
| Decrypt a buffer. | |
| virtual int64_t | GetProtectedContentLength (int64_t unprotectedLength, bool includesFinalBlock)=0 |
| Calculates size (in bytes) of content if it were to be encrypted with this ProtectionHandler. | |
| virtual int64_t | GetBlockSize ()=0 |
| Gets the block size (in bytes) for the cipher mode used by this ProtectionHandler. | |
| virtual std::vector< std::string > | GetRights () const =0 |
| Gets the rights granted to the user/identity associated with this ProtectionHandler. | |
| virtual bool | AccessCheck (const std::string &right) const =0 |
| Checks if protection handler grants user access to the specified right. | |
| virtual const std::string | GetIssuedTo ()=0 |
| Gets user associated with the protection handler. | |
| virtual const std::string | GetOwner ()=0 |
| Gets email address of content owner. | |
| virtual bool | IsIssuedToOwner ()=0 |
| Gets if the current user is the content owner or not. | |
| virtual std::shared_ptr< ProtectionDescriptor > | GetProtectionDescriptor ()=0 |
| Gets protection details. | |
| virtual const std::string | GetContentId ()=0 |
| Gets unique identifier for the document/content. | |
| virtual bool | DoesUseDeprecatedAlgorithms ()=0 |
| Gets if protection handler uses deprecated crypto algorithms (ECB) for backward compatibility or not. | |
| virtual bool | UsesApplicationDefinedPadding ()=0 |
| Gets if protected content requires application-defined padding or if it is handled internally. | |
| virtual bool | IsAuditedExtractAllowed ()=0 |
| Gets if protection handler grants user 'audited extract' right or not. | |
| virtual const std::vector< uint8_t > & | GetSerializedPublishingLicense () const =0 |
| Serialize ProtectionHandler into a publishing license (PL) | |
| virtual const std::vector< uint8_t > & | GetSerializedPreLicense (PreLicenseFormat format) const =0 |
| Get pre-license. | |
| virtual CipherMode | GetCipherMode () const =0 |
| Gets the cipher mode of the protection handler. | |
Manages protection-related actions for a specific protection configuration.
|
strong |
|
pure virtual |
Checks if protection handler grants user access to the specified right.
| right | Right to check |
|
pure virtual |
Create a protected stream that will allow for encryption/decryption of content.
| backingStream | Backing stream from which to read/write |
| contentStartPosition | Starting position (in bytes) within the backing stream where protected content begins |
| contentSize | Size (in bytes) of protected content within backing stream |
|
pure virtual |
Decrypt a buffer.
| offsetFromStart | Relative position of inputBuffer from the very beginning of the encrypted content |
| inputBuffer | Buffer of encrypted content that will be decrypted |
| inputBufferSize | Size (in bytes) of input buffer |
| outputBuffer | Buffer into which decrypted content will be copied |
| outputBufferSize | Size (in bytes) of output buffer |
| isFinal | If input buffer contains the final encrypted bytes or not |
|
pure virtual |
Gets if protection handler uses deprecated crypto algorithms (ECB) for backward compatibility or not.
|
pure virtual |
Encrypt a buffer.
| offsetFromStart | Relative position of inputBuffer from the very beginning of the cleartext content |
| inputBuffer | Buffer of cleartext content that will be encrypted |
| inputBufferSize | Size (in bytes) of input buffer |
| outputBuffer | Buffer into which encrypted content will be copied |
| outputBufferSize | Size (in bytes) of output buffer |
| isFinal | If input buffer contains the final cleartext bytes or not |
|
pure virtual |
Gets the block size (in bytes) for the cipher mode used by this ProtectionHandler.
|
pure virtual |
Gets the cipher mode of the protection handler.
|
pure virtual |
Gets unique identifier for the document/content.
|
pure virtual |
Gets user associated with the protection handler.
|
pure virtual |
Gets email address of content owner.
|
pure virtual |
Calculates size (in bytes) of content if it were to be encrypted with this ProtectionHandler.
| unprotectedLength | Size (in bytes) of unprotected content |
| includesFinalBlock | Describes 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. |
|
pure virtual |
Gets protection details.
|
pure virtual |
Gets the rights granted to the user/identity associated with this ProtectionHandler.
|
pure virtual |
Get pre-license.
| format | Pre-license format |
|
pure virtual |
Serialize ProtectionHandler into a publishing license (PL)
|
pure virtual |
Gets if protection handler grants user 'audited extract' right or not.
|
pure virtual |
Gets if the current user is the content owner or not.
|
pure virtual |
Gets if protected content requires application-defined padding or if it is handled internally.