EncryptionKeys (NotesXSPDocument - JavaScript™)
Read-Write. The key(s) used to encrypt a document associated with the XPage context in which the server script is running.
Defined in
NotesXSPDocumentSyntax
getEncryptionKeys() : java.util.Vector
setEncryptionKeys(key:string)
: void
Usage
The encrypt method uses these keys when it encrypts the XPages document.
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 possesses 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.
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.
Specifics for XPages encryption
- Fetch the IDVault object
- Fetch a UserID object out of the IDVault for a particular user
with the
getUserIDFile
method. - Get a list of private key names that are available to use with
the UserID with the
getEncryptionKeys
method. - Specify which key to use to encrypt the doc with the
setEncryptionKeys
method. - Use the
encrypt
method to encrypt note with the specified encryption key set with setEncryptionKeys