This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I have a successful implementation using PGPEncryptedDataGenerator.addMethod(PGPPublicKey) as shown below but I notice this is deprecated and we should instead be using addMethod(PGPKeyEncryptionMethodGenerator).
I know I can continue to build my JAR ignoring the warning and simply move on, but I am guessing I "should" fix this now and not worry about getting bitten in the bum later.
Here is what I have that is working now.
It is the last line in the above code that is reported as deprecated.
I have attempted to correct it by doing the below (which appears to work OK) but I am not sure if I am approaching this the correct way.
Am I on the right track or am I barking up the wrong tree with this?
I have an implementation just like yours, but I'm gettin an exception in my decryption method, getDataStream() is deprecated, in the documentation says that I have to use method that takes a PublicKeyDataDecryptorFactory do you have the right implementation of this funcionality? this is the code:
I would appreciate any help
David A Morris
Joined: May 09, 2012
I'm afraid I have not used the getDataStream() method in my implementation.