Jackcess Encrypt is an add-on library for Jackcess, the pure Java API for Microsoft Access databases. It adds support for reading and writing encrypted/password-protected .mdb, .accdb and Microsoft Money (.mny) files.
Jackcess itself deliberately ships without this functionality — the encryption schemes used by Access and Money rely on cryptographic primitives that are more sensibly maintained in a separate module with its own dependency on Bouncy Castle. This project supplies that missing piece as a CodecProvider that plugs directly into Jackcess.
Jackcess Encrypt is not an application. There is no GUI. It's a library, intended for other developers to build Java applications on top of Jackcess.
-
Drop-in Codec: Implements Jackcess's
CodecProviderSPI — plug it intoDatabaseBuilderand encrypted files just open. -
Broad Format Coverage: Supports classic Jet/MSISAM RC4 obfuscation, the RC4 CryptoAPI and binary document RC4 schemes, as well as modern Office/ECMA-376 standard and agile encryption (AES) used by
.accdb. Extensible ("external provider") encryption is not supported, as it relies on arbitrary third-party providers. -
Microsoft Money Support: Reads password-protected and unprotected Money (
.mny) files. -
Flexible Password Retrieval: Provide a password directly, or supply it lazily via a
Supplier<String>/PasswordCallback, invoked only if the file actually requires one.
-
Java Version: 11 or higher at runtime (LTS versions like Java 17 and 21 are fully supported and tested). Building the project itself requires JDK 17 or higher.
-
Main Dependencies:
- Jackcess (the base library this project extends)
- Bouncy Castle (
bcprov-jdk18on, for the underlying cryptographic primitives)
-
Build Tool: Maven
-
Code Quality: Enforced via Checkstyle and PMD.
Add Jackcess Encrypt alongside Jackcess itself.
<dependency>
<groupId>io.github.spannm</groupId>
<artifactId>jackcess</artifactId>
<version>5.1.7</version>
</dependency>
<dependency>
<groupId>io.github.spannm</groupId>
<artifactId>jackcess-encrypt</artifactId>
<version>5.1.6</version>
</dependency>implementation 'io.github.spannm:jackcess:5.1.7'
implementation 'io.github.spannm:jackcess-encrypt:5.1.6'Register a CryptCodecProvider on the DatabaseBuilder before opening an encrypted database:
import io.github.spannm.jackcess.*;
import io.github.spannm.jackcess.encrypt.CryptCodecProvider;
import java.io.File;
try (Database db = new DatabaseBuilder()
.withFile(new File("encrypted.accdb"))
.withCodecProvider(new CryptCodecProvider("myPassword"))
.open()) {
Table table = db.getTable("friends");
for (Row row : table) {
System.out.println("Friend Name: " + row.get("name"));
}
}Not every "encrypted" Access file actually requires a password — many older formats merely obfuscate the data with a key stored in the file itself. In that case CryptCodecProvider works without any password at all.
This project was forked from the original Jackcess Encrypt project on SourceForge, and is maintained as a companion to Jackcess — the two projects are versioned and released in lockstep.
Jackcess Encrypt is licensed under the Apache License, Version 2.0. See LICENSE.txt for details.
| Enjoying Jackcess Encrypt? Please leave a 🌟 to support the project! |