public class CryptCodecProvider extends Object implements com.healthmarketscience.jackcess.impl.CodecProvider, PasswordCallback
Note, not all "encrypted" access databases actually require passwords in order to be opened. Many older forms of access "encryption" ("obfuscation" would be a better term) include the keys within the access file itself. If required, a password can be provided in one of two ways:
PasswordCallback has been provided (via the constructor or
setPasswordCallback(com.healthmarketscience.jackcess.PasswordCallback)), then PasswordCallback.getPassword() will be invoked to retrieve the necessary
passwordgetPassword()
will be invoked directly on the CryptCodecProvider (which will return
the password configured via the constructor or setPassword(java.lang.String))| Constructor and Description |
|---|
CryptCodecProvider() |
CryptCodecProvider(PasswordCallback callback) |
CryptCodecProvider(String password) |
| Modifier and Type | Method and Description |
|---|---|
com.healthmarketscience.jackcess.impl.CodecHandler |
createHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
Charset charset) |
String |
getPassword()
Invoked by CryptCodecProvider when a password is necessary to open an
access database.
|
PasswordCallback |
getPasswordCallback() |
CryptCodecProvider |
setPassword(String newPassword) |
CryptCodecProvider |
setPasswordCallback(PasswordCallback newCallback) |
public CryptCodecProvider()
public CryptCodecProvider(String password)
public CryptCodecProvider(PasswordCallback callback)
public String getPassword()
PasswordCallbackgetPassword in interface PasswordCallbackpublic CryptCodecProvider setPassword(String newPassword)
public PasswordCallback getPasswordCallback()
public CryptCodecProvider setPasswordCallback(PasswordCallback newCallback)
public com.healthmarketscience.jackcess.impl.CodecHandler createHandler(com.healthmarketscience.jackcess.impl.PageChannel channel,
Charset charset)
throws IOException
createHandler in interface com.healthmarketscience.jackcess.impl.CodecProviderIOExceptionCopyright © 2010–2019 Health Market Science. All rights reserved.