AnnEncryptApply method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnEncryptApply (long hObject, long uEncryptFlags);

Overview

Refer to Implementing Annotations.

Remarks

Applies an encryptor annotation object to the underlying bitmap.

An encrypt object can have two states: it can be an encryptor or it can be a decryptor.

Use this method to apply encryptor(s), decryptor(s), or both. Applying an encryptor means that the part of the bitmap that is under the encryptor is scrambled according to the encryptor properties.

Once applied, the portion of the bitmap under the encrypt object becomes scrambled or unscrambled, and the encrypt object changes state (encryptors become decryptors, and decryptors become encryptors). Using different keys before calling this method gives different scrambling patterns. The decryptor state differs from the encryptor state in that a decryptor cannot be moved, and cannot be changed to an encryptor. The scrambling can be removed by calling AnnEncryptApply on the decryptor with the appropriate arguments. If successful, the decryptor again changes state to become an encryptor. An encryptor can be moved, and can be changed to a decryptor.

The encrypt object is useful for encrypting portions of a bitmap. After encrypting, the scrambled bitmap cannot easily be unscrambled without the associated annotation file. The scrambling can be removed by using the associated annotation file, or by using automation mode to manually change the encrypt state from encryptor to a decryptor, position the object correctly, and setting the key appropriately.

You must set the Flags property before calling this method, to indicate the objects to which to apply the encryption objects. Possible values for the Flags property are:

0

ANN_FLAG_SELECTED

ANN_FLAG_NOTTHIS

ANN_FLAG_RECURSE

ANN_FLAG_NOTCONTAINER

ANN_FLAG_NOINVALIDATE

See Also

Elements:

AnnSetEncryptOptions method, AnnEncryptOptions property, AnnGetEncryptOptions method, EnableEncryptor property, Flags property, Key property, EnableNeverEncrypted property, EnableSaveDecryptorKey property, EnableSaveEncryptorKey property, EnableClearDecryptorKey property, EnableClearEncryptorKey property, EncryptRaster property

Topics:

Annotations (Document/Medical only): Object Manipulation