public class MSISAMCryptCodecHandler extends BaseJetCryptCodecHandler
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
_baseHash |
private static int |
CRYPT_CHECK_START |
private static int |
ENCRYPTION_FLAGS_OFFSET |
private static int |
MSISAM_MAX_ENCRYPTED_PAGE |
private static int |
NEW_ENCRYPTION |
private static int |
PASSWORD_DIGEST_LENGTH |
private static int |
PASSWORD_LENGTH |
private static int |
SALT_LENGTH |
private static int |
SALT_OFFSET |
private static int |
TRAILING_PWD_LEN |
private static int |
USE_SHA1 |
CIPHER_DECRYPT_MODE, CIPHER_ENCRYPT_MODE| Constructor and Description |
|---|
MSISAMCryptCodecHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
java.lang.String password,
java.nio.charset.Charset charset,
java.nio.ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
protected org.bouncycastle.crypto.params.KeyParameter |
computeCipherParams(int pageNumber)
Generates the cipher parameters for the given page number.
|
static com.healthmarketscience.jackcess.impl.CodecHandler |
create(PasswordCallback callback,
com.healthmarketscience.jackcess.impl.PageChannel channel,
java.nio.charset.Charset charset) |
private static byte[] |
createPasswordDigest(java.nio.ByteBuffer buffer,
java.lang.String password,
java.nio.charset.Charset charset) |
protected int |
getMaxEncodedPage() |
private static byte[] |
getOldDecryptionKey(java.nio.ByteBuffer buffer,
com.healthmarketscience.jackcess.impl.JetFormat format) |
private static byte[] |
getPasswordTestBytes(java.nio.ByteBuffer buffer) |
private static void |
hashSalt(byte[] salt,
byte[] hashData) |
private void |
verifyPassword(java.nio.ByteBuffer buffer,
byte[] testEncodingKey,
byte[] testBytes) |
canDecodeInline, canEncodePartialPage, decodePage, encodePage, getStreamCipherapplyPageNumber, blockDecrypt, blockDecryptBytes, blockEncrypt, decryptBytes, decryptBytes, decryptInit, decryptInit, encryptInit, encryptInit, fill, fixToLength, fixToLength, getBlockCipher, getCipherParams, getEncodingKey, getEncodingKey, getTempBuffer, hash, hash, hash, hash, isBlankKey, processBytesFully, readHeaderPage, streamDecrypt, streamEncrypt, toString, wrapprivate static final int SALT_OFFSET
private static final int CRYPT_CHECK_START
private static final int ENCRYPTION_FLAGS_OFFSET
private static final int SALT_LENGTH
private static final int PASSWORD_LENGTH
private static final int USE_SHA1
private static final int PASSWORD_DIGEST_LENGTH
private static final int MSISAM_MAX_ENCRYPTED_PAGE
private static final int NEW_ENCRYPTION
private static final int TRAILING_PWD_LEN
private final byte[] _baseHash
MSISAMCryptCodecHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
java.lang.String password,
java.nio.charset.Charset charset,
java.nio.ByteBuffer buffer)
throws java.io.IOException
java.io.IOExceptionpublic 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 org.bouncycastle.crypto.params.KeyParameter computeCipherParams(int pageNumber)
BaseCryptCodecHandlercomputeCipherParams in class BaseCryptCodecHandlerprotected int getMaxEncodedPage()
getMaxEncodedPage in class BaseJetCryptCodecHandlerprivate void verifyPassword(java.nio.ByteBuffer buffer,
byte[] testEncodingKey,
byte[] testBytes)
private static byte[] createPasswordDigest(java.nio.ByteBuffer buffer,
java.lang.String password,
java.nio.charset.Charset charset)
private static byte[] getOldDecryptionKey(java.nio.ByteBuffer buffer,
com.healthmarketscience.jackcess.impl.JetFormat format)
private static byte[] getPasswordTestBytes(java.nio.ByteBuffer buffer)
private static void hashSalt(byte[] salt,
byte[] hashData)