com.healthmarketscience.jackcess
Class CryptCodecProvider

java.lang.Object
  extended by com.healthmarketscience.jackcess.CryptCodecProvider
All Implemented Interfaces:
CodecProvider, PasswordCallback

public class CryptCodecProvider
extends Object
implements CodecProvider, PasswordCallback

Implementation of CodecProvider with support for some forms of Microsoft Access and Microsoft Money file encryption.

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:

Author:
Vladimir Berezniker

Constructor Summary
CryptCodecProvider()
           
CryptCodecProvider(PasswordCallback callback)
           
CryptCodecProvider(String password)
           
 
Method Summary
 CodecHandler createHandler(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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptCodecProvider

public CryptCodecProvider()

CryptCodecProvider

public CryptCodecProvider(String password)

CryptCodecProvider

public CryptCodecProvider(PasswordCallback callback)
Method Detail

getPassword

public String getPassword()
Description copied from interface: PasswordCallback
Invoked by CryptCodecProvider when a password is necessary to open an access database.

Specified by:
getPassword in interface PasswordCallback
Returns:
the required password

setPassword

public CryptCodecProvider setPassword(String newPassword)

getPasswordCallback

public PasswordCallback getPasswordCallback()

setPasswordCallback

public CryptCodecProvider setPasswordCallback(PasswordCallback newCallback)

createHandler

public CodecHandler createHandler(PageChannel channel,
                                  Charset charset)
                           throws IOException
Specified by:
createHandler in interface CodecProvider
Throws:
IOException


Copyright © 2010–2017 Health Market Science. All rights reserved.