public class PGPDecryptor extends AbstractPGPEncryptor
| 构造器和说明 |
|---|
PGPDecryptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static byte[] |
decrypt(byte[] encrypted,
InputStream keyIn,
char[] password)
decrypt the passed in message stream
|
static String |
decrypt(String passphrase,
String keyFile,
String encryptedStr) |
protected static byte[] |
decryptByte(String passphrase,
String keyFile,
byte[] encryptedBytes) |
static String |
decryptFile(String passphrase,
String keyFile,
String inputFile) |
protected static org.bouncycastle.openpgp.PGPPrivateKey |
findSecretKey(org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec,
long keyID,
char[] pass) |
getBytesFromFile, readPublicKey, readPublicKey, readSecretKey, readSecretKeypublic static String decrypt(String passphrase, String keyFile, String encryptedStr) throws Exception
Exceptionpublic static String decryptFile(String passphrase, String keyFile, String inputFile) throws Exception
Exceptionprotected static byte[] decrypt(byte[] encrypted,
InputStream keyIn,
char[] password)
throws IOException,
org.bouncycastle.openpgp.PGPException,
NoSuchProviderException
encrypted - The message to be decrypted.keyIn - InputStream for keypassword - Pass phrase (key)IOException - IOExceptionorg.bouncycastle.openpgp.PGPException - PGPExceptionNoSuchProviderException - NoSuchProviderExceptionprotected static byte[] decryptByte(String passphrase, String keyFile, byte[] encryptedBytes) throws Exception
Exceptionprotected static org.bouncycastle.openpgp.PGPPrivateKey findSecretKey(org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec,
long keyID,
char[] pass)
throws org.bouncycastle.openpgp.PGPException,
NoSuchProviderException
org.bouncycastle.openpgp.PGPExceptionNoSuchProviderExceptionCopyright © 2016 jiucai.org. All rights reserved.