Java Randomness Test Suite

JRandTest at SourceForge

com.fasteasytrade.JRandTest.Algo
Class BFcipher

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

public class BFcipher
extends Cipher

BFcipher class - pure java implementation of Blowfish cipher

Copyright (c) 1997 Andrew Tuman. All rights reserved.

Free for commercial and non-commercial use.

Author:
Andrew Tuman

Field Summary
 byte[] Fiv
           
 byte[] Fkey
           
(package private)  int[] FP
           
(package private) static int[] FP0
           
(package private)  int[] FS
           
(package private) static int[] FS0
           
 
Constructor Summary
BFcipher(byte[] key, byte[] iv)
           
 
Method Summary
 void BF_cbc_encrypt(byte[] in, byte[] out, byte[] iv, int encrypt)
           
(package private)  int BF_enc(int np, int L, int R)
           
 void BF_encrypt(int[] data, int encrypt)
           
(package private)  void BF_set_key(byte[] data)
           
 void BFdecrypt(InputStream inStm, OutputStream outStm)
           
 void BFencrypt(InputStream inStm, OutputStream outStm)
           
(package private)  void DecryptBlock(byte[] InBlock, byte[] outBlock)
           
(package private)  void EncryptBlock(byte[] InBlock, byte[] outBlock)
           
protected  void finalize()
           
 void SetKey(byte[] key, byte[] iv)
           
 
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

FP0

static final int[] FP0

FS0

static final int[] FS0

FP

int[] FP

FS

int[] FS

Fkey

public byte[] Fkey

Fiv

public byte[] Fiv
Constructor Detail

BFcipher

public BFcipher(byte[] key,
                byte[] iv)
Method Detail

BF_enc

int BF_enc(int np,
           int L,
           int R)

BF_encrypt

public void BF_encrypt(int[] data,
                       int encrypt)

BF_set_key

void BF_set_key(byte[] data)

BF_cbc_encrypt

public void BF_cbc_encrypt(byte[] in,
                           byte[] out,
                           byte[] iv,
                           int encrypt)

EncryptBlock

void EncryptBlock(byte[] InBlock,
                  byte[] outBlock)

DecryptBlock

void DecryptBlock(byte[] InBlock,
                  byte[] outBlock)

SetKey

public void SetKey(byte[] key,
                   byte[] iv)

BFencrypt

public void BFencrypt(InputStream inStm,
                      OutputStream outStm)
               throws IOException
Throws:
IOException

BFdecrypt

public void BFdecrypt(InputStream inStm,
                      OutputStream outStm)
               throws IOException
Throws:
IOException

finalize

protected void finalize()

Java Randomness Test Suite

JRandTest at SourceForge

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