mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-30 12:32:17 -05:00
Fix hard-coded size
This commit is contained in:
parent
d06ba72edc
commit
7ea57b7c89
@ -9,6 +9,7 @@ import org.sufficientlysecure.keychain.pgp.WrappedPublicKeyRing;
|
|||||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||||
import org.sufficientlysecure.keychain.util.InputData;
|
import org.sufficientlysecure.keychain.util.InputData;
|
||||||
|
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@ -36,9 +37,11 @@ public class PgpVerifyTestingHelper {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
InputStream sampleInput = getClass().getResourceAsStream(testFileName);
|
byte[] sampleInputBytes = readFully(getClass().getResourceAsStream(testFileName));
|
||||||
assert null != sampleInput;
|
|
||||||
InputData data = new InputData(sampleInput, 705);
|
InputStream sampleInput = new ByteArrayInputStream(sampleInputBytes);
|
||||||
|
|
||||||
|
InputData data = new InputData(sampleInput, sampleInputBytes.length);
|
||||||
OutputStream outStream = new ByteArrayOutputStream();
|
OutputStream outStream = new ByteArrayOutputStream();
|
||||||
|
|
||||||
PgpDecryptVerify verify = new PgpDecryptVerify.Builder(providerHelper, passphraseCache, data, outStream).build();
|
PgpDecryptVerify verify = new PgpDecryptVerify.Builder(providerHelper, passphraseCache, data, outStream).build();
|
||||||
|
Loading…
Reference in New Issue
Block a user