GithubHelp home page GithubHelp logo

ccrypt-j's Introduction

ccrypt-j

This is a Java library for encrypting and decrypting files compatible with the ccrypt command line tool. It uses the Bouncy Castle as the cipher implementation.

Goals

  • Straight forward and simple to use Java API (v0.1)
  • Support for using ccrypt in Camel Routes (v0.2)

Usage

Adding ccrypt-j to your project

TODO Maven dependencies TODO Manual download and addition

Encrypting a file using ccrypt-j

CCrypt crypto = new CCrypt(/*PASSWORD*/);
crypto.encrypt(/*File to be encrypted*/);

Decrypting a file using ccrypt-j

CCrypt crypto = new CCrypt(/*PASSWORD*/);
crypto.decrypt(/*File to be decrypted*/);

Building from source

Prerquisites

  • JDK 1.7 or later has been installed
  • Maven 3 has been installed

Steps

  • Clone the Github project:
git clone https://github.com/chrsoo/ccrypt-j.git
  • Change to the git repository and run Maven:
mvn install

FAQ

Why implement ccrypt in Java?

When integrating a java based application with a system that encrypts files using ccrypt using the command line tool can be very costly. Each time a JNI call is made the entire Java process forked, consuming large amount of memory and CPU. In addition using JNI to decrypt and then pass the decrypted file to to a normal Java class is a clunky solution. With standard IO Streams encryption and decryption is straight forward and simple.

With ccrypt versions are supported by ccrypt-j?

Only the latest version (1.10) of ccrypt is supported. Possibly it can work with older versions but this has not been verified.

What cipher is used in ccrypt/ccrypt-j

The Rijndael 256-bit cipher with CFB is used. This is the same that is used in AES but there are minor incompatibilities between the AES standard and the ccrypt implementation. In particular a 256 bit IV is used instead of the 128 bit IV mandated by AES (or at least it is the only IV supported by JCE...).

ccrypt-j's People

Contributors

morecar avatar chrsoo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.