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, readSecretKey
public static String decrypt(String passphrase, String keyFile, String encryptedStr) throws Exception
Exception
public static String decryptFile(String passphrase, String keyFile, String inputFile) throws Exception
Exception
protected 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
org.bouncycastle.openpgp.PGPException
NoSuchProviderException
protected static byte[] decryptByte(String passphrase, String keyFile, byte[] encryptedBytes) throws Exception
Exception
protected static org.bouncycastle.openpgp.PGPPrivateKey findSecretKey(org.bouncycastle.openpgp.PGPSecretKeyRingCollection pgpSec, long keyID, char[] pass) throws org.bouncycastle.openpgp.PGPException, NoSuchProviderException
org.bouncycastle.openpgp.PGPException
NoSuchProviderException
Copyright © 2015 jiucai.org. All rights reserved.