public class ECMAStandardEncryptionProvider extends BlockCipherProvider
OfficeCryptCodecHandler.Phase| Modifier and Type | Field and Description |
|---|---|
private byte[] |
_baseHash |
private int |
_encKeyByteSize |
private EncryptionHeader |
_header |
private EncryptionVerifier |
_verifier |
private static int |
HASH_ITERATIONS |
private static java.util.Set<EncryptionHeader.CryptoAlgorithm> |
VALID_CRYPTO_ALGOS |
private static java.util.Set<EncryptionHeader.HashAlgorithm> |
VALID_HASH_ALGOS |
CIPHER_DECRYPT_MODE, CIPHER_ENCRYPT_MODE| Constructor and Description |
|---|
ECMAStandardEncryptionProvider(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.KeyParameter |
computeCipherParams(int pageNumber)
Generates the cipher parameters for the given page number.
|
private org.bouncycastle.crypto.params.KeyParameter |
computeEncryptionKey(byte[] blockBytes) |
private byte[] |
cryptDeriveKey(byte[] baseHash,
byte[] blockBytes,
int iterations,
int keyByteLen) |
private static byte[] |
genXBytes(byte[] finalHash,
int code) |
protected org.bouncycastle.crypto.BlockCipher |
initCipher() |
protected org.bouncycastle.crypto.Digest |
initDigest() |
protected boolean |
verifyPassword(byte[] pwdBytes) |
canDecodeInline, canEncodePartialPage, decodePageImpl, encodePageImpl, getBlockCipher, initCryptCipher, initPwdCipher, resetbits2bytes, create, decodePage, encodePage, getDigest, getPhase, initCryptDigest, initPwdDigest, 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 java.util.Set<EncryptionHeader.CryptoAlgorithm> VALID_CRYPTO_ALGOS
private static final java.util.Set<EncryptionHeader.HashAlgorithm> VALID_HASH_ALGOS
private static final int HASH_ITERATIONS
private final EncryptionHeader _header
private final EncryptionVerifier _verifier
private final byte[] _baseHash
private final int _encKeyByteSize
public ECMAStandardEncryptionProvider(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 initDigest()
initDigest in class OfficeCryptCodecHandlerprotected org.bouncycastle.crypto.BlockCipher initCipher()
initCipher in class BlockCipherProviderprotected org.bouncycastle.crypto.params.KeyParameter computeCipherParams(int pageNumber)
BaseCryptCodecHandlercomputeCipherParams in class BaseCryptCodecHandlerprotected boolean verifyPassword(byte[] pwdBytes)
verifyPassword in class OfficeCryptCodecHandlerprivate org.bouncycastle.crypto.params.KeyParameter computeEncryptionKey(byte[] blockBytes)
private byte[] cryptDeriveKey(byte[] baseHash,
byte[] blockBytes,
int iterations,
int keyByteLen)
private static byte[] genXBytes(byte[] finalHash,
int code)