Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.54 KB

File metadata and controls

44 lines (34 loc) · 1.54 KB

cdoc4j

Java library for working with CDOC 1.0 and 1.1 documents.

Important

Cdoc4j library is reaching its end of life. It is advised to migrate from old CDOC 1.0/1.1 format to new CDOC 2.0 format and use corresponding implementation libraries. More information about CDOC 2.0 can be found at https://www.id.ee/en/article/cdoc-2-0/

Origin

This project started with the help of European Regional Development Fund.

Euroopa Regionaalarengu Fond

Features

  • Creation of CDOC documents containing encrypted files
  • Decryption of files from CDOC documents

Supported formats

  • CDOC 1.0 - AES-128-CBC, only RSA recipients (deprecated)
  • CDOC 1.1 - AES-256-GCM, RSA and EC recipients (Recommended)

Requirements

How to use it

Take a look at the examples

Decrypting a file using a smart card with Java version 17 or higher

Using a smart card to decrypt a file while using Java 17 or a later version, an extra JVM argument is required:

--add-exports jdk.crypto.cryptoki/sun.security.pkcs11=ALL-UNNAMED

Maven Central

You can use the library as a dependency from Maven Central

<dependency>
    <groupId>org.open-eid.cdoc4j</groupId>
    <artifactId>cdoc4j</artifactId>
    <version>1.5.1</version>
</dependency>