examples
Class CipherBenchmark

java.lang.Object
  extended byexamples.CipherBenchmark

public class CipherBenchmark
extends java.lang.Object

Benchmark the different encryption algorithms. The code as shipped tests the MindTerm implementations of the algorithms. By uncommenting relevant portions, and building with Java 1.4 or later, it is possible to also benchmark some of the implementations in the Java runtime.

Usage: java -cp examples.jar examples.CipherBenchmark


Constructor Summary
CipherBenchmark()
           
 
Method Summary
static void bench(java.lang.String name, java.lang.String cipher, boolean encrypt, int keylen, int blocksize)
          Benchmark an algorithm
static void main(java.lang.String[] argv)
          Run the benchmark
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CipherBenchmark

public CipherBenchmark()
Method Detail

bench

public static void bench(java.lang.String name,
                         java.lang.String cipher,
                         boolean encrypt,
                         int keylen,
                         int blocksize)
                  throws GeneralSecurityException
Benchmark an algorithm

Parameters:
name - name to print when presenting result
cipher - formal name of algorithm to test
encrypt - true to encrypt and false to decrypt
keylen - length of keys (bytes)
blocksize - length of block to encrypt (bytes)
Throws:
GeneralSecurityException

main

public static void main(java.lang.String[] argv)
Run the benchmark