org.apache.poi.hssf.record.crypto
Class Biff8EncryptionKey
- java.lang.Object
-
- org.apache.poi.hssf.record.crypto.Biff8EncryptionKey
-
- Direct Known Subclasses:
- Biff8RC4Key, Biff8XORKey
public abstract class Biff8EncryptionKey extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Biff8EncryptionKey()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static Biff8EncryptionKeycreate(byte[] salt)Create using the default password and a specified docIdstatic Biff8EncryptionKeycreate(java.lang.String password, byte[] salt)static java.lang.StringgetCurrentUserPassword()static voidsetCurrentUserPassword(java.lang.String password)Sets the BIFF8 encryption/decryption password for the current thread.booleanvalidate(byte[] saltData, byte[] saltHash)
-
-
-
Method Detail
-
create
public static Biff8EncryptionKey create(byte[] salt)
Create using the default password and a specified docId- Parameters:
salt- 16 bytes
-
create
public static Biff8EncryptionKey create(java.lang.String password, byte[] salt)
-
validate
public boolean validate(byte[] saltData, byte[] saltHash)- Returns:
trueif the keyDigest is compatible with the specified saltData and saltHash
-
setCurrentUserPassword
public static void setCurrentUserPassword(java.lang.String password)
Sets the BIFF8 encryption/decryption password for the current thread.- Parameters:
password- passnullto clear user password (and use default)
-
getCurrentUserPassword
public static java.lang.String getCurrentUserPassword()
- Returns:
- the BIFF8 encryption/decryption password for the current thread.
nullif it is currently unset.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG