presumably, erel's recommendation is the one to follow (as usual).
but just so you know, your project is easy to get working, and i'm no java programmer. not sure why nobody else has stepped forward.
anyway, the attached is your project with my changes. there are a 1000 better ways to do this.
if you can look at my version and yours side by side, you will see the changes. the real changes are in the inline Java part. basically, you didn't have a major import and some of the functions need to be declared as throwing exceptions (or trapped for exceptions). i chose to implement the latter. a Java programmer would probably use the former. and once i put those functions inside try/catch blocks, i had to move some declarations to a different part of the code.
how sound the code is, i don't know. but i thought you might like to see how the thing runs in b4j (which it does). it could easily be optimized and put in a little library by someone with a modicum of Java experience. that failing, try the encryption library.