/tools/apksig/src/test/java/com/android/apksig/util/ |
D | DataSourceTestBase.java | 50 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 …]
|
D | DataSourceFromRAFFactory.java | 23 @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/v3/ |
D | V3SchemeSigner.java | 32 import com.android.apksig.util.DataSource; 68 private final DataSource mBeforeCentralDir; 69 private final DataSource mCentralDir; 70 private final DataSource mEocd; 76 private V3SchemeSigner(DataSource beforeCentralDir, in V3SchemeSigner() 77 DataSource centralDir, in V3SchemeSigner() 78 DataSource eocd, in V3SchemeSigner() 161 DataSource beforeCentralDir, in generateApkSignatureSchemeV3Block() 162 DataSource centralDir, in generateApkSignatureSchemeV3Block() 163 DataSource eocd, in generateApkSignatureSchemeV3Block() [all …]
|
D | V3SchemeVerifier.java | 34 import com.android.apksig.util.DataSource; 73 private final DataSource mApk; 87 DataSource apk, in V3SchemeVerifier() 133 DataSource apk, in verify() 165 DataSource beforeApkSigningBlock = mApk.slice(0, signatureInfo.apkSigningBlockOffset); in verify() 166 DataSource centralDir = in verify() 612 private DataSource mApk; 628 public Builder(DataSource apk, ApkUtils.ZipSections zipSections, int minSdkVersion, in Builder()
|
/tools/apksig/src/main/java/com/android/apksig/ |
D | ApkSignerEngine.java | 21 import com.android.apksig.util.DataSource; 149 void inputApkSigningBlock(DataSource apkSigningBlock) in inputApkSigningBlock() 259 DataSource zipEntries, in outputZipSections() 260 DataSource zipCentralDirectory, in outputZipSections() 261 DataSource zipEocd) in outputZipSections() 294 DataSource zipEntries, in outputZipSections2() 295 DataSource zipCentralDirectory, in outputZipSections2() 296 DataSource zipEocd) in outputZipSections2() 324 void signV4(DataSource data, File outputFile, boolean ignoreFailures) in signV4()
|
D | ApkSigner.java | 35 import com.android.apksig.util.DataSource; 110 private final DataSource mInputApkDataSource; 114 private final DataSource mOutputApkDataSource; 139 DataSource inputApkDataSource, in ApkSigner() 142 DataSource outputApkDataSource, in ApkSigner() 194 DataSource inputApk; in sign() 209 DataSource outputApkIn; in sign() 236 private void sign(DataSource inputApk, DataSink outputApkOut, DataSource outputApkIn) in sign() 247 DataSource inputApkSigningBlock = null; in sign() 258 DataSource inputApkLfhSection = in sign() [all …]
|
D | DefaultApkSignerEngine.java | 49 import com.android.apksig.util.DataSource; 637 public void inputApkSigningBlock(DataSource apkSigningBlock) { in inputApkSigningBlock() 1011 DataSource zipEntries, DataSource zipCentralDirectory, DataSource zipEocd) in outputZipSections() 1018 DataSource zipEntries, DataSource zipCentralDirectory, DataSource zipEocd) in outputZipSections2() 1024 DataSource zipEntries, in outputZipSectionsInternal() 1025 DataSource zipCentralDirectory, in outputZipSectionsInternal() 1026 DataSource zipEocd, in outputZipSectionsInternal() 1037 Pair<DataSource, Integer> paddingPair = in outputZipSectionsInternal() 1040 DataSource beforeCentralDir = paddingPair.getFirst(); in outputZipSectionsInternal() 1042 DataSource eocd = ApkSigningBlockUtils.copyWithModifiedCDOffset(beforeCentralDir, zipEocd); in outputZipSectionsInternal() [all …]
|
D | SourceStampVerifier.java | 44 import com.android.apksig.util.DataSource; 77 private final DataSource mApkDataSource; 84 DataSource apkDataSource, in SourceStampVerifier() 129 DataSource apk; in verifySourceStamp() 161 private SourceStampVerifier.Result verifySourceStamp(DataSource apk, in verifySourceStamp() 429 DataSource apk, in getApkContentDigestFromV1SigningScheme() 821 private final DataSource mApkDataSource; 842 public Builder(DataSource apk) { in Builder()
|
D | ApkVerifier.java | 49 import com.android.apksig.util.DataSource; 98 private final DataSource mApkDataSource; 106 DataSource apkDataSource, in ApkVerifier() 140 DataSource apk; in verify() 169 private Result verify(DataSource apk) in verify() 606 private int verifyAndGetMinSdkVersion(DataSource apk, ApkUtils.ZipSections zipSections) in verifyAndGetMinSdkVersion() 684 DataSource apk; in verifySourceStamp() 716 private Result verifySourceStamp(DataSource apk, String expectedCertDigest) { in verifySourceStamp() 885 private ApkSigningBlockUtils.Result getApkContentDigests(DataSource apk, in getApkContentDigests() 982 DataSource apk, in getApkContentDigestFromV1SigningScheme() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/internal/util/ |
D | ChainedDataSource.java | 20 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()
|
D | VerityTreeBuilder.java | 23 import com.android.apksig.util.DataSource; 103 public byte[] generateVerityTreeRootHash(DataSource beforeApkSigningBlock, in generateVerityTreeRootHash() 104 DataSource centralDir, DataSource eocd) throws IOException { in generateVerityTreeRootHash() 127 public byte[] generateVerityTreeRootHash(DataSource fileSource) throws IOException { in generateVerityTreeRootHash() 145 public ByteBuffer generateVerityTree(DataSource fileSource) throws IOException { in generateVerityTree() 158 DataSource src; in generateVerityTree() 222 private void digestDataByChunks(DataSource dataSource, DataSink dataSink) throws IOException { in digestDataByChunks()
|
D | ByteArrayDataSink.java | 20 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/internal/apk/ |
D | ApkSigningBlockUtils.java | 52 import com.android.apksig.util.DataSource; 134 DataSource beforeApkSigningBlock, in verifyIntegrity() 135 DataSource centralDir, in verifyIntegrity() 262 DataSource beforeCentralDir, in computeContentDigests() 263 DataSource centralDir, in computeContentDigests() 264 DataSource eocd) throws IOException, NoSuchAlgorithmException, DigestException { in computeContentDigests() 276 new DataSource[] { beforeCentralDir, centralDir, eocd }, in computeContentDigests() 287 DataSource[] contents, in computeOneMbChunkContentDigests() 301 for (DataSource input : contents) { in computeOneMbChunkContentDigests() 343 for (DataSource input : contents) { in computeOneMbChunkContentDigests() [all …]
|
/tools/apksig/src/main/java/com/android/apksig/apk/ |
D | ApkUtilsLite.java | 21 import com.android.apksig.util.DataSource; 44 public static ZipSections findZipSections(DataSource apk) in findZipSections() 95 public static ApkSigningBlock findApkSigningBlock(DataSource apk, ZipSections zipSections) in findApkSigningBlock() 159 private final DataSource mContents; 168 public ApkSigningBlock(long startOffsetInApk, DataSource contents) { in ApkSigningBlock() 184 public DataSource getContents() { in getContents()
|
D | ApkUtils.java | 26 import com.android.apksig.util.DataSource; 58 public static ZipSections findZipSections(DataSource apk) in findZipSections() 120 public static ApkSigningBlock findApkSigningBlock(DataSource apk) in findApkSigningBlock() 140 public static ApkSigningBlock findApkSigningBlock(DataSource apk, ZipSections zipSections) in findApkSigningBlock() 158 public ApkSigningBlock(long startOffsetInApk, DataSource contents) { in ApkSigningBlock() 169 public static ByteBuffer getAndroidManifest(DataSource apk) in getAndroidManifest() 189 DataSource lfhSection = apk.slice(0, zipSections.getZipCentralDirectoryOffset()); in getAndroidManifest()
|
/tools/apksig/src/main/java/com/android/apksig/util/ |
D | DataSources.java | 36 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/ |
D | V2SchemeSigner.java | 30 import com.android.apksig.util.DataSource; 148 DataSource beforeCentralDir, in generateApkSignatureSchemeV2Block() 149 DataSource centralDir, in generateApkSignatureSchemeV2Block() 150 DataSource eocd, in generateApkSignatureSchemeV2Block() 162 DataSource beforeCentralDir, in generateApkSignatureSchemeV2Block() 163 DataSource centralDir, in generateApkSignatureSchemeV2Block() 164 DataSource eocd, in generateApkSignatureSchemeV2Block()
|
D | V2SchemeVerifier.java | 31 import com.android.apksig.util.DataSource; 91 DataSource apk, in verify() 105 DataSource beforeApkSigningBlock = apk.slice(0, signatureInfo.apkSigningBlockOffset); in verify() 106 DataSource centralDir = in verify() 136 DataSource beforeApkSigningBlock, in verify() 138 DataSource centralDir, in verify()
|
/tools/apksig/src/main/java/com/android/apksig/internal/zip/ |
D | LocalFileRecord.java | 21 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()
|
D | ZipUtils.java | 21 import com.android.apksig.util.DataSource; 132 public static Pair<ByteBuffer, Long> findZipEndOfCentralDirectoryRecord(DataSource zip) in findZipEndOfCentralDirectoryRecord() 176 DataSource zip, int maxCommentSize) throws IOException { in findZipEndOfCentralDirectoryRecord() 271 DataSource apk, in parseZipCentralDirectory()
|
/tools/apksig/src/test/java/com/android/apksig/internal/util/ |
D | FileChannelDataSourceTest.java | 21 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/apksig/src/main/java/com/android/apksig/internal/apk/v4/ |
D | V4SchemeSigner.java | 33 import com.android.apksig.util.DataSource; 115 DataSource apkContent, SignerConfig signerConfig, File outputFile) in generateV4Signature() 129 DataSource apkContent, in generateV4Signature() 234 private static byte[] getApkDigest(DataSource apk) throws IOException { in getApkDigest() 261 private static byte[] getBestV3Digest(DataSource apk, ApkUtils.ZipSections zipSections) in getBestV3Digest() 291 private static byte[] getBestV2Digest(DataSource apk, ApkUtils.ZipSections zipSections) in getBestV2Digest()
|
/tools/apksig/src/test/java/com/android/apksig/ |
D | SigningCertificateLineageTest.java | 32 import com.android.apksig.util.DataSource; 95 DataSource lineageDataSource = Resources.toDataSource(getClass(), in testLineageFromBytesContainsExpectedSigners() 112 DataSource lineageDataSource = Resources.toDataSource(getClass(), in testLineageFromFileContainsExpectedSigners() 393 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKContainsExpectedSigners() 407 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKWithV31BlockContainsExpectedSigners() 420 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKWithInvalidZipCDSizeFails() 431 DataSource apkDataSource = Resources.toDataSource(getClass(), in testLineageFromAPKWithNoLineageFails()
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/ |
D | SigningExtension.java | 22 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()
|
D | ZFileDataSource.java | 20 import com.android.apksig.util.DataSource; 31 class ZFileDataSource implements DataSource { 90 public DataSource slice(long offset, long size) { in slice()
|