add preferences, use them where applicable
This commit is contained in:
@@ -25,7 +25,6 @@ import java.security.SignatureException;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.bouncycastle2.bcpg.HashAlgorithmTags;
|
||||
import org.bouncycastle2.openpgp.PGPEncryptedData;
|
||||
import org.bouncycastle2.openpgp.PGPException;
|
||||
import org.bouncycastle2.openpgp.PGPPublicKey;
|
||||
import org.bouncycastle2.openpgp.PGPPublicKeyRing;
|
||||
@@ -202,10 +201,11 @@ public class EncryptMessageActivity extends BaseActivity {
|
||||
if (encryptIt) {
|
||||
Apg.encrypt(in, out, true, mEncryptionKeyIds, getSecretKeyId(),
|
||||
Apg.getPassPhrase(), this,
|
||||
PGPEncryptedData.AES_256, null);
|
||||
getDefaultEncryptionAlgorithm(), getDefaultHashAlgorithm(),
|
||||
null);
|
||||
} else {
|
||||
Apg.signText(in, out, getSecretKeyId(),
|
||||
Apg.getPassPhrase(), HashAlgorithmTags.SHA256, this);
|
||||
Apg.getPassPhrase(), getDefaultHashAlgorithm(), this);
|
||||
}
|
||||
data.putString("message", new String(out.toByteArray()));
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user