Home
last modified time | relevance | path

Searched refs:DataSource (Results 1 – 25 of 40) sorted by relevance

12

/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceTestBase.java50 DataSource ds = c.getDataSource(); in testSize()
58 DataSource ds = c.getDataSource(); in testSlice()
60 DataSource slice = ds.slice(3, 5); in testSlice()
96 DataSource ds = c.getDataSource(); in testGetByteBuffer()
98 DataSource slice = ds.slice(3, 4); // "t123" in testGetByteBuffer()
132 DataSource ds = c.getDataSource(); in testFeed()
134 DataSource slice = ds.slice(1, 5); // "est12" in testFeed()
170 DataSource ds = c.getDataSource(); in testCopyTo()
172 DataSource slice = ds.slice(2, 7); // "cdefghi" in testCopyTo()
223 String expectedContents, DataSource ds, long offset, int size) throws IOException { in assertSliceEquals()
[all …]
DDataSourceFromRAFFactory.java23 @Override DataSource create(RandomAccessFile file) { in create()
27 @Override DataSource create(RandomAccessFile file, long offset, long size) { in create()
32 @Override DataSource create(RandomAccessFile file) { in create()
36 @Override DataSource create(RandomAccessFile file, long offset, long size) { in create()
41 abstract DataSource create(RandomAccessFile file); in create()
42 abstract DataSource create(RandomAccessFile file, long offset, long size); in create()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/
DApkSigningBlockUtils.java37 import com.android.apksig.util.DataSource;
161 DataSource beforeApkSigningBlock, in verifyIntegrity()
162 DataSource centralDir, in verifyIntegrity()
417 DataSource beforeCentralDir, in computeContentDigests()
418 DataSource centralDir, in computeContentDigests()
419 DataSource eocd) throws IOException, NoSuchAlgorithmException, DigestException { in computeContentDigests()
428 new DataSource[] { beforeCentralDir, centralDir, eocd }, in computeContentDigests()
439 DataSource[] contents, in computeOneMbChunkContentDigests()
453 for (DataSource input : contents) { in computeOneMbChunkContentDigests()
495 for (DataSource input : contents) { in computeOneMbChunkContentDigests()
[all …]
/tools/apksig/src/main/java/com/android/apksig/
DApkSigner.java30 import com.android.apksig.util.DataSource;
101 private final DataSource mInputApkDataSource;
105 private final DataSource mOutputApkDataSource;
120 DataSource inputApkDataSource, in ApkSigner()
123 DataSource outputApkDataSource, in ApkSigner()
164 DataSource inputApk; in sign()
179 DataSource outputApkIn; in sign()
207 DataSource inputApk, in sign()
209 DataSource outputApkIn) in sign()
220 DataSource inputApkSigningBlock = null; in sign()
[all …]
DDefaultApkSignerEngine.java34 import com.android.apksig.util.DataSource;
459 public void inputApkSigningBlock(DataSource apkSigningBlock) { in inputApkSigningBlock()
737 DataSource zipEntries, in outputZipSections()
738 DataSource zipCentralDirectory, in outputZipSections()
739 DataSource zipEocd) in outputZipSections()
747 DataSource zipEntries, in outputZipSections2()
748 DataSource zipCentralDirectory, in outputZipSections2()
749 DataSource zipEocd) in outputZipSections2()
756 DataSource zipEntries, in outputZipSectionsInternal()
757 DataSource zipCentralDirectory, in outputZipSectionsInternal()
[all …]
DApkSignerEngine.java21 import com.android.apksig.util.DataSource;
148 void inputApkSigningBlock(DataSource apkSigningBlock) in inputApkSigningBlock()
258 DataSource zipEntries, in outputZipSections()
259 DataSource zipCentralDirectory, in outputZipSections()
260 DataSource zipEocd) in outputZipSections()
293 DataSource zipEntries, in outputZipSections2()
294 DataSource zipCentralDirectory, in outputZipSections2()
295 DataSource zipEocd) in outputZipSections2()
DApkVerifier.java30 import com.android.apksig.util.DataSource;
77 private final DataSource mApkDataSource;
84 DataSource apkDataSource, in ApkVerifier()
116 DataSource apk; in verify()
146 private Result verify(DataSource apk) in verify()
429 DataSource apk, ApkUtils.ZipSections zipSections) in getAndroidManifestFromApk()
1834 private final DataSource mApkDataSource;
1853 public Builder(DataSource apk) { in Builder()
DSigningCertificateLineage.java34 import com.android.apksig.util.DataSource;
135 public static SigningCertificateLineage readFromDataSource(DataSource dataSource) in readFromDataSource()
174 DataSource apk = DataSources.asDataSource(f, 0, f.length()); in readFromApkFile()
186 public static SigningCertificateLineage readFromApkDataSource(DataSource apk) in readFromApkDataSource()
/tools/apksig/src/test/java/com/android/apksig/
DApkSignerTest.java35 import com.android.apksig.util.DataSource;
335 DataSource in = in signGolden()
583 DataSource out = sign(in, new ApkSigner.Builder(signers).setMinSdkVersion(1)); in testRsaSignedVerifies()
601 DataSource out = sign(in, new ApkSigner.Builder(signers).setMinSdkVersion(1)); in testDsaSignedVerifies()
620 DataSource out = sign(in, new ApkSigner.Builder(signers).setMinSdkVersion(18)); in testEcSignedVerifies()
812 DataSource out = sign("original.apk", new ApkSigner.Builder(signerConfigs) in testLineageCanBeReadAfterV3Signing()
835 DataSource signedApk = sign("original.apk", new ApkSigner.Builder(signersList) in testPublicKeyHasPositiveModulusAfterSigning()
849 private RSAPublicKey getRSAPublicKeyFromSigningBlock(DataSource apk, int signatureVersionId) in getRSAPublicKeyFromSigningBlock()
908 DataSource out = sign(inResourceName, apkSignerBuilder); in assertGolden()
953 private DataSource sign( in sign()
[all …]
DSigningCertificateLineageTest.java34 import com.android.apksig.util.DataSource;
99 DataSource lineageDataSource = Resources.toDataSource(getClass(), in testLineageFromFileContainsExpectedSigners()
368 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKContainsExpectedSigners()
380 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKWithInvalidZipCDSizeFails()
391 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKWithNoLineageFails()
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DChainedDataSource.java20 import com.android.apksig.util.DataSource;
27 public class ChainedDataSource implements DataSource {
29 private final DataSource[] mSources;
32 public ChainedDataSource(DataSource... sources) { in ChainedDataSource()
48 for (DataSource src : mSources) { in feed()
102 public DataSource slice(long offset, long size) { in slice()
107 DataSource beginSource = mSources[beginIndex]; in slice()
114 ArrayList<DataSource> sources = new ArrayList<>(); in slice()
127 return new ChainedDataSource(sources.toArray(new DataSource[0])); in slice()
DVerityTreeBuilder.java21 import com.android.apksig.util.DataSource;
61 public byte[] generateVerityTreeRootHash(DataSource beforeApkSigningBlock, in generateVerityTreeRootHash()
62 DataSource centralDir, DataSource eocd) throws IOException { in generateVerityTreeRootHash()
97 byte[] generateVerityTreeRootHash(DataSource fileSource) throws IOException { in generateVerityTreeRootHash()
110 DataSource src; in generateVerityTreeRootHash()
169 private void digestDataByChunks(DataSource dataSource, DataSink dataSink) throws IOException { in digestDataByChunks()
DByteArrayDataSink.java20 import com.android.apksig.util.DataSource;
162 public DataSource slice(long offset, long size) { in slice()
171 private class SliceDataSource implements DataSource {
210 public DataSource slice(long offset, long size) { in slice()
/tools/apksig/src/main/java/com/android/apksig/apk/
DApkUtils.java25 import com.android.apksig.util.DataSource;
52 public static ZipSections findZipSections(DataSource apk) in findZipSections()
180 public static ApkSigningBlock findApkSigningBlock(DataSource apk, ZipSections zipSections) in findApkSigningBlock()
244 private final DataSource mContents;
253 public ApkSigningBlock(long startOffsetInApk, DataSource contents) { in ApkSigningBlock()
269 public DataSource getContents() { in getContents()
280 public static ByteBuffer getAndroidManifest(DataSource apk) in getAndroidManifest()
300 DataSource lfhSection = apk.slice(0, zipSections.getZipCentralDirectoryOffset()); in getAndroidManifest()
/tools/apksig/src/main/java/com/android/apksig/internal/zip/
DLocalFileRecord.java21 import com.android.apksig.util.DataSource;
124 DataSource apk, in getRecord()
142 DataSource apk, in getRecord()
299 public long outputRecord(DataSource sourceApk, DataSink output) throws IOException { in outputRecord()
310 DataSource sourceApk, in outputRecordWithModifiedExtra()
378 DataSource lfhSection, in outputUncompressedData()
418 DataSource source, in outputUncompressedData()
441 DataSource source, in getUncompressedData()
/tools/apksig/src/main/java/com/android/apksig/util/
DDataSources.java36 public static DataSource asDataSource(ByteBuffer buffer) { in asDataSource()
47 public static DataSource asDataSource(RandomAccessFile file) { in asDataSource()
55 public static DataSource asDataSource(RandomAccessFile file, long offset, long size) { in asDataSource()
63 public static DataSource asDataSource(FileChannel channel) { in asDataSource()
74 public static DataSource asDataSource(FileChannel channel, long offset, long size) { in asDataSource()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v2/
DV2SchemeVerifier.java29 import com.android.apksig.util.DataSource;
92 DataSource apk, in verify()
106 DataSource beforeApkSigningBlock = apk.slice(0, signatureInfo.apkSigningBlockOffset); in verify()
107 DataSource centralDir = in verify()
137 DataSource beforeApkSigningBlock, in verify()
139 DataSource centralDir, in verify()
DV2SchemeSigner.java29 import com.android.apksig.util.DataSource;
143 DataSource beforeCentralDir, in generateApkSignatureSchemeV2Block()
144 DataSource centralDir, in generateApkSignatureSchemeV2Block()
145 DataSource eocd, in generateApkSignatureSchemeV2Block()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v3/
DV3SchemeVerifier.java35 import com.android.apksig.util.DataSource;
98 DataSource apk, in verify()
109 DataSource beforeApkSigningBlock = apk.slice(0, signatureInfo.apkSigningBlockOffset); in verify()
110 DataSource centralDir = in verify()
144 DataSource beforeApkSigningBlock, in verify()
146 DataSource centralDir, in verify()
DV3SchemeSigner.java31 import com.android.apksig.util.DataSource;
132 DataSource beforeCentralDir, in generateApkSignatureSchemeV3Block()
133 DataSource centralDir, in generateApkSignatureSchemeV3Block()
134 DataSource eocd, in generateApkSignatureSchemeV3Block()
/tools/apksig/src/test/java/com/android/apksig/internal/util/
DFileChannelDataSourceTest.java21 import com.android.apksig.util.DataSource;
41 DataSource rafDataSource = new FileChannelDataSource(raf.getChannel()); in testFeedsCorrectData_whenFilePartiallyReadFromBeginning()
59 DataSource rafDataSource = new FileChannelDataSource(raf.getChannel()); in testFeedsCorrectData_whenFilePartiallyReadWithOffset()
78 DataSource rafDataSource = new FileChannelDataSource(raf.getChannel()); in testFeedsCorrectData_whenSeveralMbRead()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/
DSigningExtension.java22 import com.android.apksig.util.DataSource;
350 DataSource centralDir = DataSources.asDataSource(ByteBuffer.wrap(centralDirBytes)); in onOutputZipEntriesWritten()
351 DataSource eocd = DataSources.asDataSource(ByteBuffer.wrap(eocdBytes)); in onOutputZipEntriesWritten()
354 DataSource zipEntries = new ZFileDataSource(zFile, 0, zipEntriesSizeBytes); in onOutputZipEntriesWritten()
DZFileDataSource.java20 import com.android.apksig.util.DataSource;
31 class ZFileDataSource implements DataSource {
90 public DataSource slice(long offset, long size) { in slice()
/tools/apksig/src/main/java/com/android/apksig/internal/apk/v1/
DV1SchemeVerifier.java47 import com.android.apksig.util.DataSource;
107 DataSource apk, in verify()
215 DataSource apk, in verify()
464 DataSource apk, long cdStartOffset, int minSdkVersion, int maxSdkVersion) in verifySigBlockAgainstSigFile()
1761 DataSource apk, in parseZipCentralDirectory()
1816 DataSource apk, in verifyJarEntriesAgainstManifestAndSigners()
/tools/apksig/src/test/java/com/android/apksig/internal/apk/
DApkSigningBlockUtilsTest.java6 import com.android.apksig.util.DataSource;
36 DataSource[] dataSource;
62 dataSource = new DataSource[] { in setUp()

12