Page 1 of 1

Java API questions (JAR distribution & input stream wrapping)

Posted: Thu Aug 09, 2018 7:16 pm
by antch
1) I'm interested in using the AESCrypt Java API in a project, but I noticed that it (along with the source) only seems to be available as a class file inside of a ZIP on the download page. Is there an official JAR file distribution or anything like that available? I can't even seem to find the source on Github anywhere.

2) When it comes to encrypting an InputStream the AESCrypt API takes an approach that makes actually streaming the encryption a bit more difficult than it needs to be. Instead of implementing an encrypting InputStream that is returned to the caller (Java's own CipherInputStream, for example), it writes the bytes to an OutputStream. Unfortunately in order to bridge an OutputStream to InputStream to feed to another consumer it requires piped streams along with spawning an extra thread. I have gotten this to work even while streaming large files, but it's not ideal compared to the one-line, single-threaded approach usable by CipherInputStream and other libraries that use it (OpenSSL). I think this can be implemented without too much difficulty by using a SequenceInputStream and/or an extension of CipherInputStream that handles keeping the HMAC updated along with handling the trailer bytes.

Is there a place where I can request this as a feature? As the code doesn't appear to have a Github presence I can't do it there, nor could I contribute an implementation.

Thank you!

Re: Java API questions (JAR distribution & input stream wrapping)

Posted: Thu Aug 09, 2018 11:10 pm
by paulej
There's no official jar file. The intention was for developers to take this code and use it as they wish.

And there's no official support on it. The author might respond to questions, though I've not been able to reach him for a while.

I think that might be we're in our own as far as feature enhancements.

Re: Java API questions (JAR distribution & input stream wrapping)

Posted: Fri Aug 10, 2018 12:27 pm
by antch
Thanks for the reply. If I wanted to contribute how would I go about doing that? Would you be amenable to throwing an "official" Github repo up under https://github.com/paulej?

Re: Java API questions (JAR distribution & input stream wrapping)

Posted: Tue Aug 21, 2018 7:03 am
by paulej
Not purposely ignoring this. I've just been busy. I'll try to set something up "soon".

How urgent is this? :)

Re: Java API questions (JAR distribution & input stream wrapping)

Posted: Tue Aug 21, 2018 1:09 pm
by antch
Given that AESCrypt is free I would never say it's urgent, per se. I will say that I was planning to incorporate it in a project in the coming weeks and it'd help to have a more "official" repository to point to.