Encrypt (NotesDatabase - LotusScript)
Encrypts a database.
Defined in
Syntax
To encrypt using default encryption strength and compact immediately:
Call notesDatabase .Encrypt( encryptionStrength , boolean defer)
If defer is set, encryption and compaction occur the next time the database is opened.
Parameters
encryptionStrength
String | Description |
---|---|
DBENCRYPT_STRENGTH_NONE | Database is not encrypted |
DBENCRYPT_STRENGTH_SIMPLE | Simple database encryption strength. A deprecated strength that can be used only on a database with Simple or Medium encryption. |
DBENCRYPT_STRENGTH_MEDIUM | Medium database encryption strength. A deprecated strength that can be used only on a database with Simple or Medium encryption. |
DBENCRYPT_STRENGTH_STRONG | Strong database encryption strength. |
DBENCRYPT_STRENGTH_AES128 | 128-bit AES database encryption strength. |
DBENCRYPT_STRENGTH_AES256 | 256-bit AES database encryption strength. |
defer
Specify true to wait and compact the database the first time it's opened. Specify false to compact the database immediately after encrypting it. Compacting is required to enable a new encryption strength.
Usage
Encrypting is done locally on a Domino server or Notes client. If run on the Notes client, encrypting requires Manager access in the database ACL. If run on the server, it requires Full administrator access to the server.
Compacting is required to encrypt a database. If defer isn't used and a database can't be immediately compacted, be assured that it will be encrypted the first time the database is opened after the call runs.
Example
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.GetDatabase("", "encme.nsf")
Call db.encrypt(DBENCRYPT_STRENGTH_AES256,True)