Changeset 49eeed6a


Ignore:
Timestamp:
Sep 19, 2011 1:48:24 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f186076
Parents:
35e89b7
Message:
  • Crypto: Comment out some main()
Location:
core/java/src/net/i2p/crypto
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/crypto/DSAEngine.java

    r35e89b7 r49eeed6a  
    461461     *  TheCrypto is about 5-15% faster than java.security.
    462462     */
     463/****
    463464    public static void main(String args[]) {
    464465        I2PAppContext ctx = I2PAppContext.getGlobalContext();
     
    533534        time = System.currentTimeMillis() - start;
    534535        System.err.println("JavaLib time (ms): " + time);
    535 
     536****/
    536537/****  yes, arraycopy is slower for 20 bytes
    537538        start = System.currentTimeMillis();
     
    554555        System.err.println("loop time (ms): " + time);
    555556****/
     557/****
    556558     }
     559****/
    557560}
  • core/java/src/net/i2p/crypto/ElGamalEngine.java

    r35e89b7 r49eeed6a  
    5656
    5757public class ElGamalEngine {
    58     private Log _log;
    59     private I2PAppContext _context;
     58    private final Log _log;
     59    private final I2PAppContext _context;
    6060   
    6161    /**
     
    7676    }
    7777
    78     private ElGamalEngine() { // nop
    79     }
    80 
    81    
    8278    /**
    8379     *  Note that this stops the singleton precalc thread.
     
    177173        }
    178174
    179         _context.statManager().addRateData("crypto.elGamal.encrypt", diff, diff);
     175        _context.statManager().addRateData("crypto.elGamal.encrypt", diff, 0);
    180176        return out;
    181177    }
     
    239235        }
    240236
    241         _context.statManager().addRateData("crypto.elGamal.decrypt", diff, diff);
     237        _context.statManager().addRateData("crypto.elGamal.decrypt", diff, 0);
    242238
    243239        if (ok) {
     
    251247    }
    252248
     249/****
    253250    public static void main(String args[]) {
    254251        long eTime = 0;
     
    307304                           + (gTime / numRuns));
    308305    }
     306****/
    309307}
  • core/java/src/net/i2p/crypto/SHA256Generator.java

    r35e89b7 r49eeed6a  
    152152     *  </pre>
    153153     */
     154/****
    154155    public static void main(String args[]) {
    155156        if (args.length <= 0) {
     
    190191        System.out.println("JVM time (ms): " + time);
    191192    }
     193****/
    192194}
  • core/java/src/net/i2p/crypto/YKGenerator.java

    r35e89b7 r49eeed6a  
    168168    }
    169169
     170/****
    170171    private static final int RUNS = 500;
    171172
     
    183184        System.out.println("YK fetch time for " + RUNS + " runs: " + negTime + " @ " + (negTime / RUNS) + "ms each");
    184185    }
    185 
     186****/
     187
     188    /** the thread */
    186189    private static class YKPrecalcRunner implements Runnable {
    187190        private final int _minSize;
Note: See TracChangeset for help on using the changeset viewer.