| Layer | COS_Layer |
| Object | Encryption_and_Decryption |
The Cos layer provides methods to encrypt and decrypt data in arbitrary memory blocks. The encryption and decryption uses Acrobat's built-in algorithm (RC4 from RSA Data Security, Inc.) and a key that can be specified.
| Typedef | ||
|---|---|---|
| CosCryptVersion | ||
| Callback | ||
|---|---|---|
| CosCryptStringProc
A prototype for the string encryption/decryption callback. This is part of the Crypt Filter mechanism.
|
||
| Method | ||
|---|---|---|
|
ASTVersion CosCryptGetVersion()
Gets the current version number of the encryption algorithm supported.
|
||
|
void CosDecryptData(void* src, ASTArraySize len, void* dst, char* cryptData, ASTArraySize cryptDataLen)
Decrypts data in a buffer using the specified encryption key. The standard Acrobat viewer encryption/decryption algorithm (RC4 from RSA Data Security, Inc.) is used.
|
||
|
CosByteMax CosDecryptGetMaxKeyBytes(ASTVersion cryptVersion)
Gets the maximum number of the decryption key length, in bytes, for the specified cryptVersion.
|
||
|
void CosEncryptData(void* src, ASTArraySize len, void* dst, char* cryptData, ASTArraySize cryptDataLen)
Encrypts data in a buffer using the specified encryption key. The standard Acrobat viewer encryption/decryption algorithm (RC4 from RSA Data Security, Inc.) is used.
|
||
|
CosByteMax CosEncryptGetMaxKeyBytes(ASTVersion cryptVersion)
Gets the maximum number of the encryption key length, in bytes, for the specified cryptVersion.
|
||
| CosCryptVersion |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
typedef ASInt32 CosCryptVersion;
| File: CosExpT.h |
| Line: 31 |
| CosCryptStringProc |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
ASInt32 (*CosCryptStringProc)(CosDoc dP, ASAtom filterName, char *dest, char *src, ASInt32 dstSize, ASInt32 srcLength, ASUns32 genNumber, ASUns32 objNumber)
A prototype for the string encryption/decryption callback. This is part of the Crypt Filter mechanism.
| File: CosExpT.h |
| Line: 321 |
| CosCryptGetVersion | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
ASTVersion CosCryptGetVersion()
Gets the current version number of the encryption algorithm supported.
ReturnsThe current version number of the encryption supported. |
See Also
Since
| File: CosProcs.h |
| Line: 1356 |
| CosDecryptData | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void CosDecryptData(void* src, ASTArraySize len, void* dst, char* cryptData, ASTArraySize cryptDataLen)
Decrypts data in a buffer using the specified encryption key. The standard Acrobat viewer encryption/decryption algorithm (RC4 from RSA Data Security, Inc.) is used.
An exception is raised if encryption encounters an internal error.
Parameters
src — | The buffer containing the data to decrypt. |
|
len — | The number of bytes in |
|
dst — | (Filled by the method) The buffer into which the decrypted data will be placed. This may point to the same location as |
|
cryptData — | The encryption key. |
|
cryptDataLen — | The length of the encryption key in bytes. It cannot be greater than |
See Also
Since
| File: CosProcs.h |
| Line: 978 |
| CosDecryptGetMaxKeyBytes | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
CosByteMax CosDecryptGetMaxKeyBytes(ASTVersion cryptVersion)
Gets the maximum number of the decryption key length, in bytes, for the specified cryptVersion.
Parameters
cryptVersion — | IN/OUT The Cos crypt version, which is the version of the algorithm that is used to encrypt and decrypt document data. |
The maximum number of key length, in bytes, for the specified |
See Also
Since
| File: CosProcs.h |
| Line: 1372 |
| CosEncryptData | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
void CosEncryptData(void* src, ASTArraySize len, void* dst, char* cryptData, ASTArraySize cryptDataLen)
Encrypts data in a buffer using the specified encryption key. The standard Acrobat viewer encryption/decryption algorithm (RC4 from RSA Data Security, Inc.) is used.
An exception is raised if encryption encounters an internal error.
Parameters
src — | The buffer containing the data to encrypt. |
|
len — | The number of bytes in |
|
dst — | (Filled by the method) The buffer into which the encrypted data will be placed. This may point to the same location as |
|
cryptData — | The encryption key. |
|
cryptDataLen — | Length of the encryption key, in bytes. It cannot be greater than |
See Also
Since
| File: CosProcs.h |
| Line: 1000 |
| CosEncryptGetMaxKeyBytes | () |
| Product availability: PDFL |
| Platform availability: Macintosh, Windows, UNIX |
CosByteMax CosEncryptGetMaxKeyBytes(ASTVersion cryptVersion)
Gets the maximum number of the encryption key length, in bytes, for the specified cryptVersion.
Parameters
cryptVersion — | IN/OUT The Cos crypt version, which is the version of the algorithm that is used to encrypt and decrypt document data. |
The maximum number of key length, in bytes, for the specified |
See Also
Since
| File: CosProcs.h |
| Line: 1388 |