EncryptionKeys (Document - Java)

Read-Write. The key(s) used to encrypt a document. The encrypt method uses these keys when it encrypts the document.

Defined in

Document

Data type

java.util.Vector; elements are String

Syntax

public java.util.Vector getEncryptionKeys()
    throws NotesException
public void setEncryptionKeys(java.util.Vector keys)
    throws NotesException

Usage

Each element in EncryptionKeys contains the name of an encryption key that you want to use to encrypt the document. The document can be decrypted by any user who posesses one of the keys. If there are no encryption keys specified for a document, the document is encrypted with the current user's public key and can only be decrypted by that user.

You must call the encrypt and save methods to actually encrypt the document. Since encryption works differently when a document is mailed, the EncryptionKeys property has no effect when a document is encrypted when mailed.

The name of each encryption key in a document is stored in a text item called SecretEncryptionKeys. This property returns the contents of the item.

Example