JAVA/CORBA CLASSES


encrypt method
Example

Encrypts a document.

Defined in

Document

Syntax

public void encrypt()
   throws NotesException

Usage

The encrypted document is not saved until you call save. Only the items for which isEncrypted is true are encrypted. Items for which isEncrypted is false remain visible to any user, even if the user does not have the proper encryption key.

If the EncryptionKeys property is set with one or more named keys, those keys are used to encrypt the document. Any user who has one of the encryption keys can decrypt the document. If there are no encryption keys specified, the document is encrypted with the user's public key, in which case only the user who encrypted the document can decrypt it.

If the program is running on a server, it must have permission to use Encrypt.

Since mail encryption works differently, do not use this method if you want to mail an encrypted document. Instead, set the EncryptOnSend property to true, and use the send method.

You cannot use the encrypt method on a Document object returned by getDocumentContext.

Language cross-reference

Encrypt method in LotusScript NotesDocument class

Example
See Also