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 or Supplier has been provided
(via the constructor or setPasswordCallback(com.healthmarketscience.jackcess.crypt.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) |
CryptCodecProvider(Supplier<String> callback) |
| 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() |
Supplier<String> |
getPasswordSupplier() |
CryptCodecProvider |
setPassword(String newPassword) |
CryptCodecProvider |
setPasswordCallback(PasswordCallback newCallback) |
CryptCodecProvider |
setPasswordSupplier(Supplier<String> newCallback) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetpublic 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 CryptCodecProvider setPasswordSupplier(Supplier<String> 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–2025 OpenHMS. All rights reserved.