aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2013-07-22 06:43:59 -0700
committerDominik Schürmann <dominik@dominikschuermann.de>2013-07-22 06:43:59 -0700
commitdce5b92d25d59fec14120c390cca648272a30b7f (patch)
treeee1719c8ae033abf21d7985844d454365480b787
parent92d76e482ada74538a634ff74d7836476a1bd8c1 (diff)
parenteaeb10c1e8b4f6524303a639b568bbfe7d7f0436 (diff)
downloadopen-keychain-dce5b92d25d59fec14120c390cca648272a30b7f.tar.gz
open-keychain-dce5b92d25d59fec14120c390cca648272a30b7f.tar.bz2
open-keychain-dce5b92d25d59fec14120c390cca648272a30b7f.zip
Merge pull request #57 from bcbarnes-gmx/Issue56
Implemented Issue56
-rw-r--r--OpenPGP-Keychain/libs/scpg-jdk15on-1.47.0.3-SNAPSHOT.jarbin279076 -> 279296 bytes
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/PgpMain.java8
-rw-r--r--README.md2
3 files changed, 6 insertions, 4 deletions
diff --git a/OpenPGP-Keychain/libs/scpg-jdk15on-1.47.0.3-SNAPSHOT.jar b/OpenPGP-Keychain/libs/scpg-jdk15on-1.47.0.3-SNAPSHOT.jar
index 55c28d5b7..a63969c8a 100644
--- a/OpenPGP-Keychain/libs/scpg-jdk15on-1.47.0.3-SNAPSHOT.jar
+++ b/OpenPGP-Keychain/libs/scpg-jdk15on-1.47.0.3-SNAPSHOT.jar
Binary files differ
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/PgpMain.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/PgpMain.java
index 142dfec01..d236f9faa 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/PgpMain.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/PgpMain.java
@@ -132,7 +132,8 @@ public class PgpMain {
}
// Not BC due to the use of Spongy Castle for Android
- public static final String BOUNCY_CASTLE_PROVIDER_NAME = "SC";
+ public static final String SC = BouncyCastleProvider.PROVIDER_NAME;
+ public static final String BOUNCY_CASTLE_PROVIDER_NAME = SC;
private static final int[] PREFERRED_SYMMETRIC_ALGORITHMS = new int[] {
SymmetricKeyAlgorithmTags.AES_256, SymmetricKeyAlgorithmTags.AES_192,
@@ -323,8 +324,9 @@ public class PgpMain {
}
PGPSecretKeyRing newKeyRing = PGPSecretKeyRing.copyWithNewPassword(keyRing,
- oldPassPhrase.toCharArray(), newPassPhrase.toCharArray(), keyRing.getSecretKey().getKeyEncryptionAlgorithm(),
- new SecureRandom(), BOUNCY_CASTLE_PROVIDER_NAME);
+ new JcePBESecretKeyDecryptorBuilder(
+ new JcaPGPDigestCalculatorProviderBuilder().setProvider(BOUNCY_CASTLE_PROVIDER_NAME).build()).setProvider(BOUNCY_CASTLE_PROVIDER_NAME).build(oldPassPhrase.toCharArray()),
+ new JcePBESecretKeyEncryptorBuilder(keyRing.getSecretKey().getKeyEncryptionAlgorithm()).build(newPassPhrase.toCharArray()));
updateProgress(progress, R.string.progress_savingKeyRing, 50, 100);
diff --git a/README.md b/README.md
index 30a4fbf3d..519b533c2 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ On error see: http://code.google.com/p/zxing/issues/detail?id=1207
## Build Spongy Castle
-Spongy Castle is the stock Bouncy Castle libraries with a couple of small changes to make it work on Android. OpenPGP-Keychain uses a forked version with some small changes to improve key import speed. These changes will be sent to Bouncy Castle, and Spongy Castle will be used again when they have filtered down.
+Spongy Castle is the stock Bouncy Castle libraries with a couple of small changes to make it work on Android. OpenPGP-Keychain uses a forked version with some small changes to improve key import speed. These changes have been sent to Bouncy Castle, and Spongy Castle will be used again when they have filtered down.
see
* http://rtyley.github.com/spongycastle/