bitwiseshiftleft / sjcl

Stanford Javascript Crypto Library
http://bitwiseshiftleft.github.com/sjcl/
Other
7.19k stars 987 forks source link

Recepie for decrypting/encrypting in a way compatible with Java #353

Open brasse opened 6 years ago

brasse commented 6 years ago

It would be really if there was a recepie for encrypting/decrypting in Java in a way compatible with SJCL. I'm sure this is possible with just plain Java or with bouncycastle. It could just be recepies for the plain invocations of sjcl.encrypt() and sjcl.decrypt(). Even better would be recepies for for different modes, key sizes and iterations(?). It seems this should be a few lines of code, but I can't figure it out.

Basically I want to be able to decrypt data in Java encrypted with SJCL and vice versa.

Has someone here examples/recepies on how to do this in Java in a way compatible with SJCL?