db4o |

# Configuration.encrypt Method

configures the use of encryption.

void encrypt(
bool flag
);

#### Parameters

flag
  true for turning encryption on, false for turning encryption off.

#### Remarks

configures the use of encryption.
This method needs to be called before a database file is created with the first openFile .
If encryption is set to true, you need to supply a password to seed the encryption mechanism.
db4o database files keep their encryption format after creation.

#### See Also

Configuration Interface | com.db4o.config Namespace | password