Select pub key when email could not be found
This commit is contained in:
@@ -735,14 +735,14 @@ public class PgpMain {
|
||||
*/
|
||||
public static void encryptAndSign(Context context, ProgressDialogUpdater progress,
|
||||
InputData data, OutputStream outStream, boolean useAsciiArmor, int compression,
|
||||
ArrayList<Long> encryptionKeyIds, String encryptionPassphrase,
|
||||
long[] encryptionKeyIds, String encryptionPassphrase,
|
||||
int symmetricEncryptionAlgorithm, long signatureKeyId, int signatureHashAlgorithm,
|
||||
boolean signatureForceV3, String signaturePassphrase) throws IOException,
|
||||
PgpGeneralException, PGPException, NoSuchProviderException, NoSuchAlgorithmException,
|
||||
SignatureException {
|
||||
|
||||
if (encryptionKeyIds == null) {
|
||||
encryptionKeyIds = new ArrayList<Long>();
|
||||
encryptionKeyIds = new long[0];
|
||||
}
|
||||
|
||||
ArmoredOutputStream armorOut = null;
|
||||
@@ -759,7 +759,7 @@ public class PgpMain {
|
||||
PGPSecretKeyRing signingKeyRing = null;
|
||||
PGPPrivateKey signaturePrivateKey = null;
|
||||
|
||||
if (encryptionKeyIds.size() == 0 && encryptionPassphrase == null) {
|
||||
if (encryptionKeyIds.length == 0 && encryptionPassphrase == null) {
|
||||
throw new PgpGeneralException(
|
||||
context.getString(R.string.error_noEncryptionKeysOrPassPhrase));
|
||||
}
|
||||
@@ -795,7 +795,7 @@ public class PgpMain {
|
||||
|
||||
PGPEncryptedDataGenerator cPk = new PGPEncryptedDataGenerator(encryptorBuilder);
|
||||
|
||||
if (encryptionKeyIds.size() == 0) {
|
||||
if (encryptionKeyIds.length == 0) {
|
||||
// Symmetric encryption
|
||||
Log.d(Constants.TAG, "encryptionKeyIds length is 0 -> symmetric encryption");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user