examples
Class CipherBenchmark
java.lang.Object
examples.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
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 |
CipherBenchmark
public CipherBenchmark()
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 resultcipher
- formal name of algorithm to testencrypt
- true to encrypt and false to decryptkeylen
- 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