Examples of computeDigest()


Examples of com.facebook.util.digest.LongMurmur3Hash.computeDigest()

    LongMurmur3Hash longMurmur3Hash2 = new LongMurmur3Hash();

    for (long i = 0; i < 1000; i++) {
      Assert.assertEquals(
        longMurmur3Hash1.computeDigest(i),
        longMurmur3Hash2.computeDigest(i),
        String.format("Hashes don't match for %d", i)
      );
    }
  }
}
View Full Code Here

Examples of com.facebook.util.digest.LongMurmur3Hash.computeDigest()

    LongMurmur3Hash longMurmur3Hash2 = new LongMurmur3Hash();

    for (long i = 0; i < 1000; i++) {
      Assert.assertEquals(
        longMurmur3Hash1.computeDigest(i),
        longMurmur3Hash2.computeDigest(i),
        String.format("Hashes don't match for %d", i)
      );
    }
  }
}
View Full Code Here

Examples of com.threerings.getdown.data.Resource.computeDigest()

            for (Resource rsrc : nrsrcs) {
                int oidx = orsrcs.indexOf(rsrc);
                Resource orsrc = (oidx == -1) ? null : orsrcs.remove(oidx);
                if (orsrc != null) {
                    // first see if they are the same
                    String odig = orsrc.computeDigest(md, null);
                    String ndig = rsrc.computeDigest(md, null);
                    if (odig.equals(ndig)) {
                        if (verbose) {
                            System.out.println("Unchanged: " + rsrc.getPath());
                        }
View Full Code Here

Examples of flex2.compiler.swc.Digest.computeDigest()

           
              byte[] fileBytes = new byte[(int)fileLength];
              libraryInput.read(fileBytes);
             
              Digest digest = new Digest();
              digest.computeDigest(fileBytes);
              digest.setSigned(configuration.getSigned());
              Swc[] swcs = group.getSwcs().values().toArray(new Swc[1]);
              if (swcs.length != 1)
              {
                throw new IllegalStateException("expecting one swc file, found " + swcs.length); //$NON-NLS-1$
View Full Code Here

Examples of org.restlet.representation.DigesterRepresentation.computeDigest()

            DigesterRepresentation digester = new DigesterRepresentation(rep);
            // Such representation computes the digest while
            // consuming the wrapped representation.
            digester.exhaust();
            // Set the digest with the computed one
            digester.setDigest(digester.computeDigest());
            request.setEntity(digester);

            Response response = client.handle(request);

            assertEquals(Status.SUCCESS_OK, response.getStatus());
View Full Code Here

Examples of org.restlet.representation.DigesterRepresentation.computeDigest()

                                    "9876543210");
                            digester = new DigesterRepresentation(f);
                            // Consume first
                            digester.exhaust();
                            // Set the digest
                            digester.setDigest(digester.computeDigest());
                            response.setEntity(digester);
                        } else {
                            response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
                        }
                    } catch (Exception e1) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.