use autovalue for PgpDecryptVerifyInputParcel
This commit is contained in:
@@ -103,9 +103,10 @@ public class BenchmarkOperation extends BaseOperation<BenchmarkInputParcel> {
|
||||
PgpDecryptVerifyOperation op =
|
||||
new PgpDecryptVerifyOperation(mContext, mKeyRepository,
|
||||
new ProgressScaler(mProgressable, 50 +i*(50/numRepeats), 50 +(i+1)*(50/numRepeats), 100));
|
||||
PgpDecryptVerifyInputParcel input = new PgpDecryptVerifyInputParcel(encryptResult.getResultBytes());
|
||||
input.setAllowSymmetricDecryption(true);
|
||||
decryptResult = op.execute(input, CryptoInputParcel.createCryptoInputParcel(passphrase));
|
||||
PgpDecryptVerifyInputParcel.Builder builder = PgpDecryptVerifyInputParcel.builder()
|
||||
.setInputBytes(encryptResult.getResultBytes())
|
||||
.setAllowSymmetricDecryption(true);
|
||||
decryptResult = op.execute(builder.build(), CryptoInputParcel.createCryptoInputParcel(passphrase));
|
||||
log.add(decryptResult, 1);
|
||||
log.add(LogType.MSG_BENCH_DEC_TIME, 2, String.format("%.2f", decryptResult.mOperationTime / 1000.0));
|
||||
totalTime += decryptResult.mOperationTime;
|
||||
|
||||
@@ -103,10 +103,12 @@ public class InputDataOperation extends BaseOperation<InputDataParcel> {
|
||||
PgpDecryptVerifyOperation op =
|
||||
new PgpDecryptVerifyOperation(mContext, mKeyRepository, mProgressable);
|
||||
|
||||
decryptInput.setInputUri(input.getInputUri());
|
||||
|
||||
currentInputUri = TemporaryFileProvider.createFile(mContext);
|
||||
decryptInput.setOutputUri(currentInputUri);
|
||||
|
||||
decryptInput = decryptInput.toBuilder()
|
||||
.setInputUri(input.getInputUri())
|
||||
.setOutputUri(currentInputUri)
|
||||
.build();
|
||||
|
||||
decryptResult = op.execute(decryptInput, cryptoInput);
|
||||
if (decryptResult.isPending()) {
|
||||
@@ -264,9 +266,10 @@ public class InputDataOperation extends BaseOperation<InputDataParcel> {
|
||||
}
|
||||
detachedSig.close();
|
||||
|
||||
PgpDecryptVerifyInputParcel decryptInput = new PgpDecryptVerifyInputParcel();
|
||||
decryptInput.setInputUri(uncheckedSignedDataUri);
|
||||
decryptInput.setDetachedSignature(detachedSig.toByteArray());
|
||||
PgpDecryptVerifyInputParcel decryptInput = PgpDecryptVerifyInputParcel.builder()
|
||||
.setInputUri(uncheckedSignedDataUri)
|
||||
.setDetachedSignature(detachedSig.toByteArray())
|
||||
.build();
|
||||
|
||||
PgpDecryptVerifyOperation op =
|
||||
new PgpDecryptVerifyOperation(mContext, mKeyRepository, mProgressable);
|
||||
|
||||
@@ -152,7 +152,9 @@ public class KeybaseVerificationOperation extends BaseOperation<KeybaseVerificat
|
||||
|
||||
PgpDecryptVerifyOperation op = new PgpDecryptVerifyOperation(mContext, mKeyRepository, mProgressable);
|
||||
|
||||
PgpDecryptVerifyInputParcel input = new PgpDecryptVerifyInputParcel(messageBytes);
|
||||
PgpDecryptVerifyInputParcel input = PgpDecryptVerifyInputParcel.builder()
|
||||
.setInputBytes(messageBytes)
|
||||
.build();
|
||||
|
||||
DecryptVerifyResult decryptVerifyResult = op.execute(input, CryptoInputParcel.createCryptoInputParcel());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user