public class MasterKeys
extends java.lang.Object
| Constructor and Description |
|---|
MasterKeys(byte[] clientCacheKey,
byte[] databaseKey,
byte[] tempfilesMasterSecret,
long flags) |
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(java.io.File masterKeysFile,
java.lang.String newPassword,
java.util.Random hardRandom) |
static void |
clear(byte[] buf) |
DatabaseKey |
createDatabaseKey(java.util.Random random) |
static MasterKeys |
createRandom(java.util.Random random)
Create a MasterKeys with random keys.
|
MasterSecret |
getPersistentMasterSecret()
Used for creating keys for persistent encrypted tempfiles
|
static void |
killMasterKeys(java.io.File masterKeysFile) |
static MasterKeys |
read(java.io.File masterKeysFile,
java.util.Random hardRandom,
java.lang.String password) |
public MasterKeys(byte[] clientCacheKey,
byte[] databaseKey,
byte[] tempfilesMasterSecret,
long flags)
public static MasterKeys createRandom(java.util.Random random)
random - A secure RNG. Not specifically a SecureRandom because we want to be able to
use this in tests.public static MasterKeys read(java.io.File masterKeysFile, java.util.Random hardRandom, java.lang.String password) throws MasterKeysWrongPasswordException, MasterKeysFileSizeException, java.io.IOException
MasterKeysWrongPasswordExceptionMasterKeysFileSizeExceptionjava.io.IOExceptionpublic static void clear(byte[] buf)
public void changePassword(java.io.File masterKeysFile,
java.lang.String newPassword,
java.util.Random hardRandom)
throws java.io.IOException
java.io.IOExceptionpublic static void killMasterKeys(java.io.File masterKeysFile)
throws java.io.IOException
java.io.IOExceptionpublic DatabaseKey createDatabaseKey(java.util.Random random)
public MasterSecret getPersistentMasterSecret()