Wrox Programmer Forums
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 10th, 2011, 05:59 AM
Registered User
 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retreive pgp secret key

Hi,
i'm using opengpg to decrypt an encrypted file with GnuPG. I have tested some example code giving in the example folder for opengpg. Here, to decrypt file, we need to pass the secret key file as a parameter. My problem is that i want to retreive this secret key from the keyring og gpg and not giving in it as a file. I know that this key is password protected but is there another way to retreive secret key than searching it from an inputstream variable.

Tnahks
 
Old August 10th, 2011, 08:42 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Use the PGPSecretKeyRingCollection class.

Regards,

David
 
Old August 12th, 2011, 06:49 AM
Registered User
 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

yes I'm using this class to search the key. But this class need a stream input. Where and how can i find the default file storage of secret keys ?
 
Old August 12th, 2011, 09:29 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

You'll need to check your gpg documentation to find the location of the default secret key ring file.

Regards,

David





Similar Threads
Thread Thread Starter Forum Replies Last Post
PGP Encryption everest C# 2005 4 October 28th, 2007 08:20 PM
Identifying a PGP file bnraju1 BOOK: Beginning Cryptography with Java 4 July 13th, 2007 04:05 PM
Encrypting using a secret key Littlen BOOK: Beginning Cryptography with Java 3 April 27th, 2007 06:01 PM
pgp file? ktchlin C# 1 July 26th, 2004 07:49 AM
What's the secret? Adam H-W Flash (all versions) 2 March 24th, 2004 01:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.