diff options
author | Thialfihar <thi@thialfihar.org> | 2014-04-29 18:57:43 +0200 |
---|---|---|
committer | Thialfihar <thi@thialfihar.org> | 2014-04-29 18:57:43 +0200 |
commit | 324971e4484b2d227e261993977837ef63a87dc3 (patch) | |
tree | e97080817d431d34285df4bea81caf95e97fb181 /OpenKeychain/src | |
parent | 9e6bf2abbb1395798c7b6957b193d738940a2b57 (diff) | |
download | open-keychain-324971e4484b2d227e261993977837ef63a87dc3.tar.gz open-keychain-324971e4484b2d227e261993977837ef63a87dc3.tar.bz2 open-keychain-324971e4484b2d227e261993977837ef63a87dc3.zip |
Rename setter methods for PgpSignEncrypt.Builder
Diffstat (limited to 'OpenKeychain/src')
3 files changed, 45 insertions, 45 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncrypt.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncrypt.java index 4b1ecc0f1..30cac9b77 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncrypt.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpSignEncrypt.java @@ -141,53 +141,53 @@ public class PgpSignEncrypt { this.mOutStream = outStream; } - public Builder progressable(Progressable progressable) { - this.mProgressable = progressable; + public Builder setProgressable(Progressable progressable) { + mProgressable = progressable; return this; } - public Builder enableAsciiArmorOutput(boolean enableAsciiArmorOutput) { - this.mEnableAsciiArmorOutput = enableAsciiArmorOutput; + public Builder setEnableAsciiArmorOutput(boolean enableAsciiArmorOutput) { + mEnableAsciiArmorOutput = enableAsciiArmorOutput; return this; } - public Builder compressionId(int compressionId) { - this.mCompressionId = compressionId; + public Builder setCompressionId(int compressionId) { + mCompressionId = compressionId; return this; } - public Builder encryptionMasterKeyIds(long[] encryptionMasterKeyIds) { + public Builder setEncryptionMasterKeyIds(long[] encryptionMasterKeyIds) { this.mEncryptionMasterKeyIds = encryptionMasterKeyIds; return this; } - public Builder symmetricPassphrase(String symmetricPassphrase) { + public Builder setSymmetricPassphrase(String symmetricPassphrase) { this.mSymmetricPassphrase = symmetricPassphrase; return this; } - public Builder symmetricEncryptionAlgorithm(int symmetricEncryptionAlgorithm) { - this.mSymmetricEncryptionAlgorithm = symmetricEncryptionAlgorithm; + public Builder setSymmetricEncryptionAlgorithm(int symmetricEncryptionAlgorithm) { + mSymmetricEncryptionAlgorithm = symmetricEncryptionAlgorithm; return this; } - public Builder signatureMasterKeyId(long signatureMasterKeyId) { + public Builder setSignatureMasterKeyId(long signatureMasterKeyId) { this.mSignatureMasterKeyId = signatureMasterKeyId; return this; } - public Builder signatureHashAlgorithm(int signatureHashAlgorithm) { - this.mSignatureHashAlgorithm = signatureHashAlgorithm; + public Builder setSignatureHashAlgorithm(int signatureHashAlgorithm) { + mSignatureHashAlgorithm = signatureHashAlgorithm; return this; } - public Builder signatureForceV3(boolean signatureForceV3) { - this.mSignatureForceV3 = signatureForceV3; + public Builder setSignatureForceV3(boolean signatureForceV3) { + mSignatureForceV3 = signatureForceV3; return this; } - public Builder signaturePassphrase(String signaturePassphrase) { - this.mSignaturePassphrase = signaturePassphrase; + public Builder setSignaturePassphrase(String signaturePassphrase) { + mSignaturePassphrase = signaturePassphrase; return this; } @@ -197,7 +197,7 @@ public class PgpSignEncrypt { * @param encryptToSigner * @return */ - public Builder encryptToSigner(boolean encryptToSigner) { + public Builder setEncryptToSigner(boolean encryptToSigner) { this.mEncryptToSigner = encryptToSigner; return this; } @@ -208,7 +208,7 @@ public class PgpSignEncrypt { * @param cleartextInput * @return */ - public Builder cleartextInput(boolean cleartextInput) { + public Builder setCleartextInput(boolean cleartextInput) { this.mCleartextInput = cleartextInput; return this; } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java index 6e0179aaa..6adabf18a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java @@ -170,14 +170,14 @@ public class OpenPgpService extends RemoteService { new ProviderHelper(getContext()), PgpHelper.getFullVersion(getContext()), inputData, os); - builder.enableAsciiArmorOutput(asciiArmor) - .signatureHashAlgorithm(accSettings.getHashAlgorithm()) - .signatureForceV3(false) - .signatureMasterKeyId(accSettings.getKeyId()) - .signaturePassphrase(passphrase); + builder.setEnableAsciiArmorOutput(asciiArmor) + .setSignatureHashAlgorithm(accSettings.getHashAlgorithm()) + .setSignatureForceV3(false) + .setSignatureMasterKeyId(accSettings.getKeyId()) + .setSignaturePassphrase(passphrase); // TODO: currently always assume cleartext input, no sign-only of binary currently! - builder.cleartextInput(true); + builder.setCleartextInput(true); try { builder.build().execute(); @@ -254,10 +254,10 @@ public class OpenPgpService extends RemoteService { new ProviderHelper(getContext()), PgpHelper.getFullVersion(getContext()), inputData, os); - builder.enableAsciiArmorOutput(asciiArmor) - .compressionId(accSettings.getCompression()) - .symmetricEncryptionAlgorithm(accSettings.getEncryptionAlgorithm()) - .encryptionMasterKeyIds(keyIds); + builder.setEnableAsciiArmorOutput(asciiArmor) + .setCompressionId(accSettings.getCompression()) + .setSymmetricEncryptionAlgorithm(accSettings.getEncryptionAlgorithm()) + .setEncryptionMasterKeyIds(keyIds); if (sign) { String passphrase; @@ -274,13 +274,13 @@ public class OpenPgpService extends RemoteService { } // sign and encrypt - builder.signatureHashAlgorithm(accSettings.getHashAlgorithm()) - .signatureForceV3(false) - .signatureMasterKeyId(accSettings.getKeyId()) - .signaturePassphrase(passphrase); + builder.setSignatureHashAlgorithm(accSettings.getHashAlgorithm()) + .setSignatureForceV3(false) + .setSignatureMasterKeyId(accSettings.getKeyId()) + .setSignaturePassphrase(passphrase); } else { // encrypt only - builder.signatureMasterKeyId(Constants.key.none); + builder.setSignatureMasterKeyId(Constants.key.none); } try { diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 7b12f525c..a3187bbe6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -313,24 +313,24 @@ public class KeychainIntentService extends IntentService new ProviderHelper(this), PgpHelper.getFullVersion(this), inputData, outStream); - builder.progressable(this); + builder.setProgressable(this); - builder.enableAsciiArmorOutput(useAsciiArmor) - .compressionId(compressionId) - .symmetricEncryptionAlgorithm( + builder.setEnableAsciiArmorOutput(useAsciiArmor) + .setCompressionId(compressionId) + .setSymmetricEncryptionAlgorithm( Preferences.getPreferences(this).getDefaultEncryptionAlgorithm()) - .signatureForceV3(Preferences.getPreferences(this).getForceV3Signatures()) - .encryptionMasterKeyIds(encryptionKeyIds) - .symmetricPassphrase(symmetricPassphrase) - .signatureMasterKeyId(signatureKeyId) - .signatureHashAlgorithm( + .setSignatureForceV3(Preferences.getPreferences(this).getForceV3Signatures()) + .setEncryptionMasterKeyIds(encryptionKeyIds) + .setSymmetricPassphrase(symmetricPassphrase) + .setSignatureMasterKeyId(signatureKeyId) + .setSignatureHashAlgorithm( Preferences.getPreferences(this).getDefaultHashAlgorithm()) - .signaturePassphrase( + .setSignaturePassphrase( PassphraseCacheService.getCachedPassphrase(this, signatureKeyId)); // this assumes that the bytes are cleartext (valid for current implementation!) if (target == TARGET_BYTES) { - builder.cleartextInput(true); + builder.setCleartextInput(true); } builder.build().execute(); |