Skip to content

Latest commit

 

History

215 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central Version Maven Central Last Update GitHub Stars
GitHub Actions Workflow Status Javadoc

Welcome to Jackcess Encrypt

Encryption Support for Jackcess

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.

────────────────────

✨ Key Features

  • Drop-in Codec: Implements Jackcess's CodecProvider SPI — plug it into DatabaseBuilder and 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.

 

🛠 Tech Stack & Dependencies

  • 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.

 

📦 Installation

Add Jackcess Encrypt alongside Jackcess itself.

Maven (pom.xml)

<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>

Gradle (Groovy / build.gradle)

implementation 'io.github.spannm:jackcess:5.1.7'
implementation 'io.github.spannm:jackcess-encrypt:5.1.6'

🚦 Usage Example

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.

❤️ Origin & Maintenance

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.

⚖️ License

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!

About

An add-on to the Jackcess library for handling encryption in MS Access files

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages