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

@@ -1175,7 +1175,7 @@ public class Apg {
long encryptionKeyIds[], long signatureKeyId,
String signaturePassPhrase,
ProgressDialogUpdater progress,
int symmetricAlgorithm,
int symmetricAlgorithm, int hashAlgorithm,
String passPhrase)
throws IOException, GeneralException, PGPException, NoSuchProviderException,
NoSuchAlgorithmException, SignatureException {
@@ -1251,7 +1251,7 @@ public class Apg {
progress.setProgress("preparing signature...", 30, 100);
signatureGenerator =
new PGPSignatureGenerator(signingKey.getPublicKey().getAlgorithm(),
HashAlgorithmTags.SHA1,
hashAlgorithm,
new BouncyCastleProvider());
signatureGenerator.initSign(PGPSignature.BINARY_DOCUMENT, signaturePrivateKey);
String userId = getMainUserId(getMasterKey(signingKeyRing));