Java Randomness Test Suite

JRandTest at SourceForge

com.fasteasytrade.JRandTest.Algo
Class RC4Key

java.lang.Object
  extended bycom.fasteasytrade.JRandTest.Algo.Cipher
      extended bycom.fasteasytrade.JRandTest.Algo.RC4Key

public class RC4Key
extends Cipher

Alleged RC4 implemented as RC4Key. Returns byte.

Include debug level and logging into external file.

Author:
Zur Aougav

Field Summary
private  byte[] CypherBytes
           
(package private)  int debugLevel
           
(package private)  int i
           
(package private)  int jump
           
private  byte[] Key
           
private  byte[] KeyBytes
           
(package private)  PrintStream ps
           
(package private)  boolean ready
           
 
Constructor Summary
(package private) RC4Key(byte[] Key, int d, String logname)
           
 
Method Summary
protected  void finalize()
          carefull clear of buffers in RC4Key object
 byte next()
          encrypt/decrypt from data to Result.
 void print(byte s)
           
 void print(String s)
           
 void println(byte s)
           
 void println(String s)
           
 
Methods inherited from class com.fasteasytrade.JRandTest.Algo.Cipher
compareBytes
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ready

boolean ready

Key

private byte[] Key

KeyBytes

private byte[] KeyBytes

CypherBytes

private byte[] CypherBytes

i

int i

jump

int jump

ps

PrintStream ps

debugLevel

int debugLevel
Constructor Detail

RC4Key

RC4Key(byte[] Key,
       int d,
       String logname)
Parameters:
Key - is a byte array to init internal state vector.
d - for debug level. 0 is none. 1 is minimal into logfile. 2 is detailed.
logname - is used with d > 0
Method Detail

next

public byte next()
encrypt/decrypt from data to Result. Uses the key in Key


print

public void print(String s)

println

public void println(String s)

print

public void print(byte s)

println

public void println(byte s)

finalize

protected void finalize()
                 throws Throwable
carefull clear of buffers in RC4Key object

Throws:
Throwable

Java Randomness Test Suite

JRandTest at SourceForge

JRandTest at SourceForge
Copyright © 2005 Zur Aougav. All Rights Reserved.