Can I use a keyfile with the Java API?

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
multibobwork
Posts: 9
Joined: Fri Mar 28, 2014 1:12 am

Can I use a keyfile with the Java API?

Post by multibobwork » Thu Oct 15, 2015 1:30 pm

Hi,

I would like to use a generated keyfile (keygen) with the Java API to encrypt and decrypt is this possible? If so can you send an example.

Also is there a way to generate the keyfile with the Java API?

Regards,

- Bob

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Can I use a keyfile with the Java API?

Post by paulej » Thu Oct 15, 2015 4:01 pm

The Java code doesn't have a routine to generate key files, but it should be easy to do. Just write out a proper UTF-16LE file with random characters. Don't forget to insert a BOM as the first two octets of the file.

multibobwork
Posts: 9
Joined: Fri Mar 28, 2014 1:12 am

Re: Can I use a keyfile with the Java API?

Post by multibobwork » Thu Oct 15, 2015 4:07 pm

Hi,

Thanks for the reply but can the Java API use a keyfile that I generated with the Linux command line?

Regards,

- Bob

User avatar
paulej
Posts: 521
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Can I use a keyfile with the Java API?

Post by paulej » Fri Oct 16, 2015 12:12 am

No, you'd have to write that logic yourself.

Post Reply