com.android.dx.io
Class DexHasher

java.lang.Object
  extended by com.android.dx.io.DexHasher

public final class DexHasher
extends Object

Generates and stores the checksum and signature of a dex file.


Constructor Summary
DexHasher()
           
 
Method Summary
 int computeChecksum(DexBuffer dex)
          Returns the checksum of all but the first 12 bytes of dex.
 byte[] computeSignature(DexBuffer dex)
          Returns the signature of all but the first 32 bytes of dex.
 void writeHashes(DexBuffer dex)
          Generates the signature and checksum of the dex file out and writes them to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DexHasher

public DexHasher()
Method Detail

computeSignature

public byte[] computeSignature(DexBuffer dex)
                        throws IOException
Returns the signature of all but the first 32 bytes of dex. The first 32 bytes of dex files are not specified to be included in the signature.

Throws:
IOException

computeChecksum

public int computeChecksum(DexBuffer dex)
                    throws IOException
Returns the checksum of all but the first 12 bytes of dex.

Throws:
IOException

writeHashes

public void writeHashes(DexBuffer dex)
                 throws IOException
Generates the signature and checksum of the dex file out and writes them to the file.

Throws:
IOException


Copyright © 2012. All Rights Reserved.