@Override public boolean equals(Object obj) { DexClassInfo other = (DexClassInfo) obj; if (!classDesc.equals(other.classDesc)) { return false; } return owner.computeSignature(false).equals(other.owner.computeSignature(false)); } }
/** * Generates the signature and checksum of the dex file {@code out} and * writes them to the file. */ public void writeHashes() throws IOException { openSection(SIGNATURE_OFFSET).write(computeSignature(true)); openSection(CHECKSUM_OFFSET).writeInt(computeChecksum()); }
public void executeAndSaveTo(OutputStream out) throws IOException { byte[] oldDexSign = this.oldDex.computeSignature(false); if (oldDexSign == null) { throw new IOException("failed to compute old dex's signature.");
buffer.writeInt(this.patchedEncodedArrayItemsOffset); buffer.writeInt(this.patchedAnnotationsDirectoryItemsOffset); buffer.write(this.oldDex.computeSignature(false)); int firstChunkOffset = buffer.position(); buffer.position(posOfFirstChunkOffsetField);
@Override public boolean equals(Object obj) { DexClassInfo other = (DexClassInfo) obj; if (!classDesc.equals(other.classDesc)) { return false; } return owner.computeSignature(false).equals(other.owner.computeSignature(false)); } }
/** * Generates the signature and checksum of the dex file {@code out} and * writes them to the file. */ public void writeHashes() throws IOException { openSection(SIGNATURE_OFFSET).write(computeSignature(true)); openSection(CHECKSUM_OFFSET).writeInt(computeChecksum()); }
public void executeAndSaveTo(OutputStream out) throws IOException { byte[] oldDexSign = this.oldDex.computeSignature(false); if (oldDexSign == null) { throw new IOException("failed to compute old dex's signature.");
buffer.writeInt(this.patchedEncodedArrayItemsOffset); buffer.writeInt(this.patchedAnnotationsDirectoryItemsOffset); buffer.write(this.oldDex.computeSignature(false)); int firstChunkOffset = buffer.position(); buffer.position(posOfFirstChunkOffsetField);