typedef ASInt32 CosCryptVersion;
ASInt32 CosCryptStringProc(CosDoc dP, ASAtom filterName, char *dest, char *src, ASInt32 dstSize, ASInt32 srcLength, ASUns32 genNumber, ASUns32 objNumber);
ASTVersion CosCryptGetVersion();
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.
void CosDecryptData(void *src, ASTArraySize len, void *dst, char *cryptData, ASTArraySize cryptDataLen);
src | The buffer containing the data to decrypt.
|
len | The number of bytes in
src. |
dst | (Filled by the method) The buffer into which the decrypted data will be placed. This may point to the same location as
src. |
cryptData | The encryption key.
|
cryptDataLen | The length of the encryption key in bytes. It cannot be greater than
5. |
cryptVersion. CosByteMax CosDecryptGetMaxKeyBytes(ASTVersion cryptVersion);
cryptVersion | IN/OUT The Cos crypt version, which is the version of the algorithm that is used to encrypt and decrypt document data.
cryptVersion equal to 0 is treated as cryptVersion equal to 1 to maintain backward compatibility. |
cryptVersion. If cryptVersion is not currently supported, it returns-1.
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.
void CosEncryptData(void *src, ASTArraySize len, void *dst, char *cryptData, ASTArraySize cryptDataLen);
src | The buffer containing the data to encrypt.
|
len | The number of bytes in
src. |
dst | (Filled by the method) The buffer into which the encrypted data will be placed. This may point to the same location as
src. |
cryptData | The encryption key.
|
cryptDataLen | Length of the encryption key, in bytes. It cannot be greater than
5. |
cryptVersion. CosByteMax CosEncryptGetMaxKeyBytes(ASTVersion cryptVersion);
cryptVersion | IN/OUT The Cos crypt version, which is the version of the algorithm that is used to encrypt and decrypt document data.
cryptVersion equal to 0 is treated as cryptVersion equal to 1 to maintain backward compatibility. |
cryptVersion. If cryptVersion is not currently supported, it returns-1.