public static byte[] doubleDigest(byte[] input,int offset,int length){
synchronized (digest) {
    digest.reset();
    digest.update(input,offset,length);
    byte[] first=digest.digest();
    return digest.digest(first);
  }
}

public static byte [ ] doubleDigest ( byte [ ] input , int offset , int length ) { synchronized ( digest ) { digest . reset ( ) ; digest . update ( input , offset , length ) ; byte [ ] first = digest . digest ( ) ; return digest . digest ( first ) ; } }
calculates the sha - 256 hash of the given byte range , and then hashes the resulting hash again . this is standard procedure in bitcoin . the resulting hash is in big endian form .
