Examples of digest()


Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      System.out.print("New SHA1 ");
      time = System.currentTimeMillis();
      for (int i = 0; i < loops; i++)
      {
        newsha.reset();
        newsha.digest(dBuffer);
      }
      time = System.currentTimeMillis() - time;
      speed = totalMBytes / (time / (double)1024);
      System.out.println(info + time + " ms @ " + speed + " MiB/s");
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      System.out.print("New SHA1 ");
      time = System.currentTimeMillis();
      for (int i = 0; i < loops; i++)
      {
        newsha.reset();
        newsha.digest(hBuffer);
      }
      time = System.currentTimeMillis() - time;
      speed = totalMBytes / (time / (double)1024);
      System.out.println(info + time + " ms @ " + speed + " MiB/s");
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      dBuffer.position(offset);
     
      oldsha.reset();
      newsha.reset();
      oldh = oldsha.digest(hBuffer);
      newh = newsha.digest(hBuffer);
      oldsha.reset();
      newsha.reset();
      oldd = oldsha.digest(dBuffer);
      newd = newsha.digest(dBuffer);
     
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      oldh = oldsha.digest(hBuffer);
      newh = newsha.digest(hBuffer);
      oldsha.reset();
      newsha.reset();
      oldd = oldsha.digest(dBuffer);
      newd = newsha.digest(dBuffer);
     
     
      if(!Arrays.equals(oldh, newh) || !Arrays.equals(oldd, newd) || !Arrays.equals(oldd, oldh))
      {
        System.out.println("hash mismatch at offset: "+offset+" size: "+size);
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      hview = hBuffer.slice();
     
      oldsha.reset();
      newsha.reset();
      oldh = oldsha.digest(hview);
      newh = newsha.digest(hview);
      oldsha.reset();
      newsha.reset();
      oldd = oldsha.digest(dview);
      newd = newsha.digest(dview);
     
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      oldh = oldsha.digest(hview);
      newh = newsha.digest(hview);
      oldsha.reset();
      newsha.reset();
      oldd = oldsha.digest(dview);
      newd = newsha.digest(dview);
     
     
      if(!Arrays.equals(oldh, newh) || !Arrays.equals(oldd, newd) || !Arrays.equals(oldd, oldh))
      {
        System.out.println("(view) hash mismatch at offset: "+offset+" size: "+size);
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

      SHA1 sha1 = new SHA1();
     
      sha1.update( ByteBuffer.wrap( salt ));
      sha1.update( ByteBuffer.wrap( pw_bytes ));
     
      String  encoded_pw = ByteFormatter.encodeString( sha1.digest());

      COConfigurationManager.setParameter( persist_timeout_key, timeout );
      COConfigurationManager.setParameter( persist_pw_key_type, pw_type );
      COConfigurationManager.setParameter( persist_pw_key, encoded_pw );
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

          SHA1 sha1 = new SHA1();
         
          sha1.update( ByteBuffer.wrap( salt ));
          sha1.update( ByteBuffer.wrap( pw_bytes ));
         
          String  encoded_pw = ByteFormatter.encodeString( sha1.digest());
         
          if ( tester != null && !tester.testPassword( encoded_pw.toCharArray())){
         
              // retry
           
View Full Code Here

Examples of org.gudy.azureus2.core3.util.SHA1.digest()

        SHA1  sha1 = new SHA1();
     
        sha1.update( ByteBuffer.wrap( IV ));
        sha1.update( ByteBuffer.wrap( hash ));
       
        id = new HashWrapper( sha1.digest() );
      }
    }
   
    protected HashWrapper
    getID()
View Full Code Here

Examples of org.hsqldb.lib.MD5.digest()

    private String sessionIdHash;

    public SingleUseToken(String sessionId) throws TokenException {
        try {
            MD5 md5 = new MD5();
            this.sessionIdHash = md5.digest(sessionId);
        } catch (Exception e) {
            throw new TokenException("Error creating SingleUseToken.", e);
        }

        date = new Date();
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.