Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.SHA1Simple


    read      = false;
   
    String  key1_str =  result.getEngine().getId() + ":" + result.getName();
   
    try{
      byte[] sha1 = new SHA1Simple().calculateHash( key1_str.getBytes( "UTF-8" ));
     
      key1 = new byte[10];
     
      System.arraycopy( sha1, 0, key1, 0, 10 );
     
    }catch( Throwable e ){
     
      Debug.printStackTrace(e);
    }
   
    String  uid = result.getUID();
   
    if ( uid != null && uid.length() > 0 ){
   
      String  key2_str = result.getEngine().getId() + ":" + uid;
     
      try{
        byte[] sha1 = new SHA1Simple().calculateHash( key2_str.getBytes( "UTF-8" ));
       
        key2 = new byte[10];
       
        System.arraycopy( sha1, 0, key2, 0, 10 );
       
View Full Code Here


            req[4] = (byte)(time>>24);
            req[5] = (byte)(time>>16);
            req[6] = (byte)(time>>8);
            req[7] = (byte)(time);
           
            System.arraycopy( new SHA1Simple().calculateHash(key_block.getBytes()), 0, req, 8, 20 );
           
            Signature  sig = Signature.getInstance("MD5withRSA" );
           
            sig.initSign( key );
           
View Full Code Here

    File    _file )
  {
    file    = _file;
   
    try{
      hash    = new SHA1Simple().calculateHash( file.getAbsolutePath().getBytes( "UTF-8" ));
     
    }catch( Throwable e ){
     
      Debug.out(e);
    }
View Full Code Here

    file  = _file;
   
    save_to = file.getCacheFile();
   
    try{
      hash = new SHA1Simple().calculateHash( save_to.getAbsolutePath().getBytes( "UTF-8" ));
     
    }catch( Throwable e ){
     
      Debug.out(e);
    }
View Full Code Here

    byte[]  bytes = info.getHash();
   
    if ( bytes == null ){
     
      try{
        bytes = new SHA1Simple().calculateHash( getPrivateInfoKey(info).getBytes( "ISO-8859-1" ));
       
      }catch( Throwable e ){
       
        Debug.out( e );
       
View Full Code Here

  {
    stream_factory    = _stream_factory;
    save_to        = _save_to;
   
    try{
      hash    = new SHA1Simple().calculateHash( _save_to.getAbsolutePath().getBytes( "UTF-8" ));
     
    }catch( Throwable e ){
     
      Debug.out(e);
    }
View Full Code Here

    if ( download.getTorrent() == null ){
     
      return;
    }
   
    byte[] hash = new SHA1Simple().calculateHash(download.getTorrent().getHash());

   
    AZInstanceTracked[]  peers =
      instance_manager.track(
        hash,
View Full Code Here

      lblX.setImage(img);
    }


    filterDelayTimer = new Timer("Filter");
    filterDelayTimer.addEvent(SystemTime.getCurrentTime() + 300,
        new TimerEventPerformer() {
          public void perform(TimerEvent event) {
            filterDelayTimer.destroy();
            filterDelayTimer = null;
View Full Code Here

      if ( compact_timer == null && System.getProperty("transitory.startup", "0").equals("0")){
               
        compact_timer = SimpleTimer.addPeriodicEvent(
          "IRB:compactor",
          60*1000,
          new TimerEventPerformer()
          {
            public void
            perform(
              TimerEvent event )
            { 
View Full Code Here

          }
         
          System.setProperty( "java.protocol.handler.pkgs", handlers );
          */
       
        URL.setURLStreamHandlerFactory(new AzURLStreamHandlerFactory());
            
            // DNS cache timeouts
         
          System.setProperty("sun.net.inetaddr.ttl", "60");
          System.setProperty("networkaddress.cache.ttl", "60");
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.SHA1Simple

Copyright © 2018 www.massapicom. 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.