add preferences, use them where applicable

This commit is contained in:
Thialfihar
2010-04-28 23:35:11 +00:00
parent 86192e39d9
commit e83a5311ae
12 changed files with 366 additions and 78 deletions

View File

@@ -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) {