On Mar 19, 2010, at 4:51 PM, Juergen Weber wrote:

> Hi,
> 
> has anybody tried to decrypt a symmetric gpg encryption with Java
> using Java Cryptography Architecture included in the JDK?
> 
> echo hello |  gpg -c --cipher-algo 3DES -a --passphrase "my pass" |
> java MyDeCrypt --cipher-algo 3DES --passphrase "my pass"
> 
> should result in hello
> 
> This should be possible, I googled for a sample, but there seems to be none.

GnuPG encrypts using the OpenPGP standard.  The Java cryptography architecture 
doesn't follow that spec (that "file format" if you like). If you want to do 
OpenPGP in Java, I suggest http://www.bouncycastle.org/java.html which is a 
provider for the cryptography architecture.

David


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to