public abstract class Biff8EncryptionKey
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected javax.crypto.SecretKey |
_secretKey |
Constructor and Description |
---|
Biff8EncryptionKey() |
Modifier and Type | Method and Description |
---|---|
static Biff8EncryptionKey |
create(byte[] salt)
Create using the default password and a specified docId
|
static Biff8EncryptionKey |
create(java.lang.String password,
byte[] salt) |
static java.lang.String |
getCurrentUserPassword() |
static void |
setCurrentUserPassword(java.lang.String password)
Sets the BIFF8 encryption/decryption password for the current thread.
|
boolean |
validate(byte[] saltData,
byte[] saltHash) |
public static Biff8EncryptionKey create(byte[] salt)
salt
- 16 bytespublic static Biff8EncryptionKey create(java.lang.String password, byte[] salt)
public boolean validate(byte[] saltData, byte[] saltHash)
true
if the keyDigest is compatible with the specified saltData and saltHashpublic static void setCurrentUserPassword(java.lang.String password)
password
- pass null
to clear user password (and use default)public static java.lang.String getCurrentUserPassword()
null
if it is currently unset.Copyright 2016 The Apache Software Foundation or its licensors, as applicable.