Package | Description |
---|---|
com.hcl.domino.data |
Modifier and Type | Method and Description |
---|---|
static Document.EncryptionMode |
Document.EncryptionMode.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Document.EncryptionMode[] |
Document.EncryptionMode.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
Document |
Document.copyAndEncrypt(UserId id,
Collection<Document.EncryptionMode> encryptionMode)
This function copies and encrypts (seals) the encryption enabled fields in a document
(including the document's file objects), using a
UserId .It can encrypt a document in several ways -- by using the Domino public key of the caller, by using specified secret encryption keys stored in the caller's ID, or by using the Domino public keys of specified users, if the document does not have any mime parts. The method decides which type of encryption to do based upon the setting of the flag passed to it in its encryptionMode argument.If the ENCRYPT_WITH_USER_PUBLIC_KEY flag is set, it uses the
caller's public ID to encrypt the document.In this case, only the user who encodes the document can decrypt it. This feature allows an individual to protect information from anyone else. If, instead, the ENCRYPT_WITH_USER_PUBLIC_KEY flag is not set,
then the function expects the document to contain a field named "SecretEncryptionKeys"
a field named "PublicEncryptionKeys", or both.Each field is either a ItemDataType.TYPE_TEXT or ItemDataType.TYPE_TEXT_LIST field."SecretEncryptionKeys" contains the name(s) of the secret encryption keys in the calling user's ID to be used to encrypt the document. This feature is intended to allow a group to encrypt some of the documents in a single database in a way that only they can decrypt them -- they must share the secret encryption keys among themselves first for this to work. "PublicEncryptionKeys" contains the name(s) of users, in canonical format. The document will be encrypted with each user's Domino public key. The user can then decrypt the document with the private key in the user's ID. This feature provides a way to encrypt documents, such as mail documents, for another user. The document must contain at least one encryption enabled item (an item with the Item.ItemFlag.ENCRYPTED flag set)
in order to be encrypted.If the note has mime parts and flag ENCRYPT_SMIME_IF_MIME_PRESENT
is set, then it is SMIME encrypted.If the document is to be signed as well as encrypted, you must sign the document before using this method. |
Copyright © 2019–2021 HCL. All rights reserved.