justinludwig / jpgpj

Java Pretty Good Privacy Jig
MIT License
74 stars 20 forks source link

Decrypt only using Passphrase #2

Closed umang6891 closed 7 years ago

umang6891 commented 7 years ago

I have only used single string passphrase to encrypt the file. How do use this library to decrypt the file?

justinludwig commented 7 years ago

You can with a org.c02e.jpgpj.Decryptor object, by first setting its symmetricPassphrase property to the passphrase and its verificationRequired property to false, and then calling its decrypt() method. There's an example of this in the Symmetric Decryption section of the Decrypting Files wiki page:

https://github.com/justinludwig/jpgpj/wiki/DecryptingFiles#symmetric-decryption

umang6891 commented 7 years ago

Thanks. It worked.