|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasteasytrade.JRandTest.IO.FileRandomStream com.fasteasytrade.JRandTest.IO.FileAlgoRandomStream com.fasteasytrade.JRandTest.Algo.BlowFish
Stream of random bytes from BFcipher class
Field Summary | |
(package private) BFcipher |
bf
actual class algorithm |
(package private) byte[] |
defaultPublicKey
default key |
(package private) byte[] |
inAlgoBuffer
input buffer to algorithm. |
(package private) byte[] |
iv
iv array to algorthm |
(package private) byte[] |
outAlgoBuffer
output buffer to algorithm. |
(package private) int |
outAlgoBufferIx
|
Fields inherited from class com.fasteasytrade.JRandTest.IO.FileAlgoRandomStream |
maxCount, privateKey, privateKeyLength, publicKey, publicKeyLength |
Fields inherited from class com.fasteasytrade.JRandTest.IO.FileRandomStream |
actualSize, buffer, count, countLastRead, filename, open, SIZE |
Constructor Summary | |
BlowFish()
|
|
BlowFish(String keyFileName)
|
Method Summary | |
String |
getFilename()
get the file name to be processed. this file is the raw data to be read, or the input file processed by algorithm. |
boolean |
openInputStream()
open the input stream. |
byte |
readByte()
read one byte from a file. |
int |
readInt()
Processing is similar to readByte. |
long |
readLong()
Processing is similar to readByte. |
void |
setFilename(String s)
set file name to be processed. this file is the raw data to be read, or the input file processed by algorithm. |
void |
setup()
setup will be implemented by each subclass |
void |
setupKeys()
set up length and new arrays to public and private keys will be implemented by each algorithm |
Methods inherited from class com.fasteasytrade.JRandTest.IO.FileAlgoRandomStream |
setPrivateKey, setPrivateKeyFromFile, setPublicKey, setPublicKeyFromFile |
Methods inherited from class com.fasteasytrade.JRandTest.IO.FileRandomStream |
closeInputStream, finalize, isOpen |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.fasteasytrade.JRandTest.IO.RandomStream |
closeInputStream, isOpen |
Field Detail |
BFcipher bf
byte[] defaultPublicKey
byte[] inAlgoBuffer
byte[] outAlgoBuffer
int outAlgoBufferIx
byte[] iv
Constructor Detail |
public BlowFish()
public BlowFish(String keyFileName)
Method Detail |
public String getFilename()
RandomStream
getFilename
in interface RandomStream
getFilename
in class FileAlgoRandomStream
RandomStream.getFilename()
public void setFilename(String s)
RandomStream
setFilename
in interface RandomStream
setFilename
in class FileAlgoRandomStream
s
- set algorithm input filename fileRandomStream.setFilename(java.lang.String)
public void setupKeys()
AlgoRandomStream
will be implemented by each algorithm
setupKeys
in interface AlgoRandomStream
setupKeys
in class FileAlgoRandomStream
AlgoRandomStream.setupKeys()
public void setup()
FileAlgoRandomStream
setup
in interface AlgoRandomStream
setup
in class FileAlgoRandomStream
AlgoRandomStream.setup()
public boolean openInputStream() throws Exception
RandomStream
openInputStream
in interface RandomStream
openInputStream
in class FileRandomStream
Exception
if filename exists (not null), we open file and later will encrypt
it. Else, algorithm will generate random data (as PRNG).
public byte readByte() throws Exception
RandomStream
first time ( if !isOpen() ) open file/stream, and return byte
at end of file close stream and returns -1
readByte
in interface RandomStream
readByte
in class FileAlgoRandomStream
Exception
RandomStream.readByte()
public int readInt() throws Exception
RandomStream
readInt
in interface RandomStream
readInt
in class FileAlgoRandomStream
Exception
RandomStream.readInt()
public long readLong() throws Exception
RandomStream
readLong
in interface RandomStream
readLong
in class FileAlgoRandomStream
Exception
RandomStream.readLong()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |