public abstract class OfficeCryptCodecHandler extends BaseCryptCodecHandler
| Modifier and Type | Class and Description |
|---|---|
protected static class |
OfficeCryptCodecHandler.Phase |
| Modifier and Type | Field and Description |
|---|---|
private org.bouncycastle.crypto.Digest |
_digest |
private OfficeCryptCodecHandler.Phase |
_phase |
private java.nio.ByteBuffer |
_tempIntBuf |
private static int |
CRYPT_STRUCTURE_OFFSET |
private static int |
MAX_PASSWORD_LEN |
CIPHER_DECRYPT_MODE, CIPHER_ENCRYPT_MODE| Modifier | Constructor and Description |
|---|---|
protected |
OfficeCryptCodecHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
byte[] encodingKey) |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
bits2bytes(int bits) |
static com.healthmarketscience.jackcess.impl.CodecHandler |
create(PasswordCallback callback,
com.healthmarketscience.jackcess.impl.PageChannel channel,
java.nio.charset.Charset charset) |
void |
decodePage(java.nio.ByteBuffer inPage,
java.nio.ByteBuffer outPage,
int pageNumber) |
protected abstract void |
decodePageImpl(java.nio.ByteBuffer inPage,
java.nio.ByteBuffer outPage,
int pageNumber) |
java.nio.ByteBuffer |
encodePage(java.nio.ByteBuffer buffer,
int pageNumber,
int pageOffset) |
protected abstract java.nio.ByteBuffer |
encodePageImpl(java.nio.ByteBuffer buffer,
int pageNumber,
int pageOffset) |
protected org.bouncycastle.crypto.Digest |
getDigest() |
private static byte[] |
getPasswordBytes(java.lang.String password) |
protected OfficeCryptCodecHandler.Phase |
getPhase() |
protected org.bouncycastle.crypto.Digest |
initCryptDigest() |
protected org.bouncycastle.crypto.Digest |
initDigest() |
protected org.bouncycastle.crypto.Digest |
initPwdDigest() |
protected byte[] |
int2bytes(int val) |
private static boolean |
isEncryptedPage(int pageNumber) |
protected byte[] |
iterateHash(byte[] baseHash,
int iterations) |
protected void |
reset() |
protected abstract boolean |
verifyPassword(byte[] pwdBytes) |
applyPageNumber, blockDecrypt, blockDecryptBytes, blockEncrypt, computeCipherParams, decryptBytes, decryptBytes, decryptInit, decryptInit, encryptInit, encryptInit, fill, fixToLength, fixToLength, getBlockCipher, getCipherParams, getEncodingKey, getEncodingKey, getStreamCipher, getTempBuffer, hash, hash, hash, hash, isBlankKey, processBytesFully, readHeaderPage, streamDecrypt, streamEncrypt, toString, wrapprivate static final int MAX_PASSWORD_LEN
private static final int CRYPT_STRUCTURE_OFFSET
private org.bouncycastle.crypto.Digest _digest
private java.nio.ByteBuffer _tempIntBuf
private OfficeCryptCodecHandler.Phase _phase
protected OfficeCryptCodecHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
byte[] encodingKey)
public static com.healthmarketscience.jackcess.impl.CodecHandler create(PasswordCallback callback, com.healthmarketscience.jackcess.impl.PageChannel channel, java.nio.charset.Charset charset) throws java.io.IOException
java.io.IOExceptionprotected OfficeCryptCodecHandler.Phase getPhase()
protected org.bouncycastle.crypto.Digest getDigest()
protected org.bouncycastle.crypto.Digest initDigest()
protected org.bouncycastle.crypto.Digest initPwdDigest()
protected org.bouncycastle.crypto.Digest initCryptDigest()
protected final byte[] int2bytes(int val)
protected void reset()
public void decodePage(java.nio.ByteBuffer inPage,
java.nio.ByteBuffer outPage,
int pageNumber)
throws java.io.IOException
java.io.IOExceptionpublic java.nio.ByteBuffer encodePage(java.nio.ByteBuffer buffer,
int pageNumber,
int pageOffset)
throws java.io.IOException
java.io.IOExceptionprotected byte[] iterateHash(byte[] baseHash,
int iterations)
private static boolean isEncryptedPage(int pageNumber)
private static byte[] getPasswordBytes(java.lang.String password)
protected static int bits2bytes(int bits)
protected abstract void decodePageImpl(java.nio.ByteBuffer inPage,
java.nio.ByteBuffer outPage,
int pageNumber)
throws java.io.IOException
java.io.IOExceptionprotected abstract java.nio.ByteBuffer encodePageImpl(java.nio.ByteBuffer buffer,
int pageNumber,
int pageOffset)
throws java.io.IOException
java.io.IOExceptionprotected abstract boolean verifyPassword(byte[] pwdBytes)