public class AgileEncryptionProvider extends BlockCipherProvider
OfficeCryptCodecHandler.Phase| Modifier and Type | Field and Description |
|---|---|
private CTEncryption |
_encryptDesc |
private byte[] |
_keyValue |
private CTPasswordKeyEncryptor |
_pwdKeyEnc |
private static byte[] |
ENC_VALUE_BLOCK |
private static byte[] |
ENC_VERIFIER_INPUT_BLOCK |
private static byte[] |
ENC_VERIFIER_VALUE_BLOCK |
private static int |
RESERVED_VAL |
CIPHER_DECRYPT_MODE, CIPHER_ENCRYPT_MODE| Constructor and Description |
|---|
AgileEncryptionProvider(com.healthmarketscience.jackcess.impl.PageChannel channel,
byte[] encodingKey,
java.nio.ByteBuffer encProvBuf,
byte[] pwdBytes) |
| Modifier and Type | Method and Description |
|---|---|
protected org.bouncycastle.crypto.params.ParametersWithIV |
computeCipherParams(int pageNumber)
Generates the cipher parameters for the given page number.
|
private byte[] |
cryptDeriveIV(byte[] blockBytes,
byte[] salt,
int keyByteLen) |
private byte[] |
cryptDeriveKey(byte[] pwdBytes,
byte[] blockBytes,
byte[] salt,
int iterations,
int keyByteLen) |
private byte[] |
decryptKeyValue(byte[] pwdBytes) |
private byte[] |
decryptVerifierHashInput(byte[] pwdBytes) |
private byte[] |
decryptVerifierHashValue(byte[] pwdBytes) |
protected org.bouncycastle.crypto.BlockCipher |
initCryptCipher() |
protected org.bouncycastle.crypto.Digest |
initCryptDigest() |
protected org.bouncycastle.crypto.BlockCipher |
initPwdCipher() |
protected org.bouncycastle.crypto.Digest |
initPwdDigest() |
protected boolean |
verifyPassword(byte[] pwdBytes) |
canDecodeInline, canEncodePartialPage, decodePageImpl, encodePageImpl, getBlockCipher, initCipher, resetbits2bytes, create, decodePage, encodePage, getDigest, getPhase, initDigest, int2bytes, iterateHashapplyPageNumber, blockDecrypt, blockDecryptBytes, blockEncrypt, decryptBytes, decryptBytes, decryptInit, decryptInit, encryptInit, encryptInit, fill, fixToLength, fixToLength, getCipherParams, getEncodingKey, getEncodingKey, getStreamCipher, getTempBuffer, hash, hash, hash, hash, isBlankKey, processBytesFully, readHeaderPage, streamDecrypt, streamEncrypt, toString, wrapprivate static final int RESERVED_VAL
private static final byte[] ENC_VERIFIER_INPUT_BLOCK
private static final byte[] ENC_VERIFIER_VALUE_BLOCK
private static final byte[] ENC_VALUE_BLOCK
private final CTEncryption _encryptDesc
private final CTPasswordKeyEncryptor _pwdKeyEnc
private final byte[] _keyValue
public AgileEncryptionProvider(com.healthmarketscience.jackcess.impl.PageChannel channel,
byte[] encodingKey,
java.nio.ByteBuffer encProvBuf,
byte[] pwdBytes)
throws java.io.IOException
java.io.IOExceptionprotected org.bouncycastle.crypto.Digest initPwdDigest()
initPwdDigest in class OfficeCryptCodecHandlerprotected org.bouncycastle.crypto.Digest initCryptDigest()
initCryptDigest in class OfficeCryptCodecHandlerprotected org.bouncycastle.crypto.BlockCipher initPwdCipher()
initPwdCipher in class BlockCipherProviderprotected org.bouncycastle.crypto.BlockCipher initCryptCipher()
initCryptCipher in class BlockCipherProviderprotected boolean verifyPassword(byte[] pwdBytes)
verifyPassword in class OfficeCryptCodecHandlerprotected org.bouncycastle.crypto.params.ParametersWithIV computeCipherParams(int pageNumber)
BaseCryptCodecHandlercomputeCipherParams in class BaseCryptCodecHandlerprivate byte[] decryptVerifierHashInput(byte[] pwdBytes)
private byte[] decryptVerifierHashValue(byte[] pwdBytes)
private byte[] decryptKeyValue(byte[] pwdBytes)
private byte[] cryptDeriveKey(byte[] pwdBytes,
byte[] blockBytes,
byte[] salt,
int iterations,
int keyByteLen)
private byte[] cryptDeriveIV(byte[] blockBytes,
byte[] salt,
int keyByteLen)