Foxit PDF SDK
<FSDRMSecurityCallback>协议 参考
类 <FSDRMSecurityCallback> 继承关系图:
<FSSecurityCallback>

构造函数

(FSSecurityHandlerCipherType- getCipherType:sub_filter:
 A callback function used to get the cipher type for encryption algorithm. 更多...
 
(NSString *) - getFileID:sub_filter:
 A callback function used to get the file identity string. 更多...
 
(NSData *) - getInitialKey:sub_filter:
 A callback function used to get the initial key to decrypt the DRM protected document. 更多...
 
(int) - getKeyLength:sub_filter:
 A callback function used to get the length of cipher key. 更多...
 
(unsigned int) - getUserPermissions:sub_filter:
 A callback function used to get the current user permissions. 更多...
 
(BOOL) - isOwner:sub_filter:
 A callback function used to check if current user is the owner of the PDF document. 更多...
 
- 构造函数 继承自 <FSSecurityCallback>
(FSPDFDocEncryptType) - GetSecurityType
 Get the encryption type of security callback. 更多...
 

详细描述

This class represents a callback object for Foxit DRM decryption. If user wants to use their own Foxit DRM security callback, user should inherit this callback class and implement the pure virtual functions (as callback functions), and then register their own Foxit DRM security callback object to Foxit PDF SDK by function FSLibrary::registerSecurityCallback:callback: with filter "FoxitDRM". Function FSLibrary::unregisterSecurityCallback: can be called to unregister the security callback object with the registered filter name.

函数文档

◆ getCipherType:sub_filter:()

- (FSSecurityHandlerCipherType) getCipherType: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to get the cipher type for encryption algorithm.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
The cipher type. Please refer to values starting from FSSecurityHandlerCipherNone and this should be one of these values.

◆ getFileID:sub_filter:()

- (NSString*) getFileID: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to get the file identity string.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
The identity string, used to identify the file.

◆ getInitialKey:sub_filter:()

- (NSData*) getInitialKey: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to get the initial key to decrypt the DRM protected document.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
The initial key.

◆ getKeyLength:sub_filter:()

- (int) getKeyLength: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to get the length of cipher key.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
The key length.
For FSSecurityHandlerCipherRC4 cipher, this value should be between 5 and 16.
For FSSecurityHandlerCipherAES cipher, this value should be 16 or 32.

◆ getUserPermissions:sub_filter:()

- (unsigned int) getUserPermissions: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to get the current user permissions.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
Current user permissions. Please refer to values starting from FSPDFDocPermPrint and this can be one or combination of these values.

◆ isOwner:sub_filter:()

- (BOOL) isOwner: (FSPDFDoc *)  document
sub_filter: (NSString *)  sub_filter 
required

A callback function used to check if current user is the owner of the PDF document.

参数
[in]documentA PDF document object.
[in]sub_filterThe sub filter name that specifies the syntax of the encryption dictionary contents.
注解
User should implement this callback function.
返回
YES means current user is the owner of the PDF document, while NO means not.