Can anybody help me unzip my file?
--------------------------------------------------------------
I'm new to PGP and trying to use org.bouncycastle for decrypting file, the private key i'm using is SHA256withDSA 2048 bit key algorithm,
but i'm getting below exception:
org.bouncycastle.openpgp.PGPException: org.bouncycastle.openpgp.PGPPublicKeyRing found where PGPSecretKeyRing expected
at org.bouncycastle.openpgp.PGPSecretKeyRingCollection.<init>(Unknown Source)
at com.pgptest.KeyBasedFileProcessorUtil.decryptFile(KeyBasedFileProcessorUtil.java:172)
at com.pgptest.PGPCryptoTools.decrypt(PGPCryptoTools.java:65)
at com.pgptest.PGPCryptoTools.main(PGPCryptoTools.java:20)
I'm using following dependencies:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15</artifactId>
<version>${org.bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15</artifactId>
<version>${org.bouncycastle.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk16 -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.46</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcpg-jdk15on -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.47</version>
</dependency>
Please find attached class file and key i'm using for decryption.
I'm not able to get any support on this, How can i resolve this issue
Thanks & Regards,
Jagjit Gupta
Mobile +91 8447126110
This message (including any attachments) contains confidential and/or privileged information. It is intended for a specific individual and purpose and is protected by law. If you are not the intended recipient, please notify the sender immediately and delete
this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.