Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hssf.record.crypto
Class Biff8EncryptionKey

    java.lang.Object
      org.apache.poi.hssf.record.crypto.Biff8EncryptionKey

    public final class Biff8EncryptionKey

extends java.lang.Object

Method Summary
`static Biff8EncryptionKey` | `create(byte[] docId)` Create using the default password and a specified docId
`static Biff8EncryptionKey` | `create(java.lang.String password, byte[] docIdData)`
`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)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### create

    public static Biff8EncryptionKey create(byte[] docId)

  Create using the default password and a specified docId

  Parameters:
    `docId` - 16 bytes

### create

    public static Biff8EncryptionKey create(java.lang.String password,
                                            byte[] docIdData)

### validate

    public boolean validate(byte[] saltData,
                            byte[] saltHash)

  Returns:
    `true` if 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` - pass `null` to clear user password (and use default)

### getCurrentUserPassword

    public static java.lang.String getCurrentUserPassword()

  Returns:
    the BIFF8 encryption/decryption password for the current thread. `null` if it is currently unset.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD