cryptix.security
Class StreamCipher

java.lang.Object
  extended bycryptix.security.StreamCipher
Direct Known Subclasses:
CFB, CipherFeedback

public abstract class StreamCipher
extends java.lang.Object

This abstract class is the basis for a stream cipher of any form.

StreamCipher objects support only the Cryptix v2.2 API.

Note: compatibility with Cryptix 2.2 applies only to clients of this class. Subclasses must be rewritten as JCE algorithms.

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.2 $

Since:
Cryptix 2.2
Author:
Systemics Ltd, David Hopwood
See Also:
java.security.Cipher

Constructor Summary
StreamCipher()
          Deprecated.  
 
Method Summary
 void decrypt(byte[] text)
          Deprecated. This function decrypts a block of data.
 void decrypt(byte[] in, byte[] out)
          Deprecated. This function decrypts a block of data.
abstract  void decrypt(byte[] in, int in_offset, byte[] out, int out_offset, int length)
          Deprecated. This function decrypts a block of data.
 void encrypt(byte[] text)
          Deprecated. This function encrypts a block of data.
 void encrypt(byte[] in, byte[] out)
          Deprecated. This function encrypts a block of data.
abstract  void encrypt(byte[] in, int in_offset, byte[] out, int out_offset, int length)
          Deprecated. This function encrypts a block of data.
abstract  int keyLength()
          Deprecated. This function returns the length of the key for this cipher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamCipher

public StreamCipher()
Deprecated. 
Method Detail

encrypt

public final void encrypt(byte[] text)
Deprecated. 
This function encrypts a block of data. The contents of the array will be changed.

Parameters:
text - the plaintext to be encrypted.

decrypt

public final void decrypt(byte[] text)
Deprecated. 
This function decrypts a block of data. The contents of the array will be changed.

Parameters:
text - the ciphertext to be decrypted.

encrypt

public final void encrypt(byte[] in,
                          byte[] out)
Deprecated. 
This function encrypts a block of data. The contents of the array in remain unchanged, and the result is stored in the array out. However, array in and array out can be the same.

Parameters:
in - the plaintext to be encrypted.
out - where the ciphertext will be stored.

decrypt

public final void decrypt(byte[] in,
                          byte[] out)
Deprecated. 
This function decrypts a block of data. The contents of the array in remain unchanged, and the result is stored in the array out. However, array in and array out can be the same.

Parameters:
in - the ciphertext to be decrypted.
out - where the plaintext will be stored.

encrypt

public abstract void encrypt(byte[] in,
                             int in_offset,
                             byte[] out,
                             int out_offset,
                             int length)
Deprecated. 
This function encrypts a block of data. The contents of the array in remain unchanged, and the result is stored in the array out. However, array in and array out can be the same.

Parameters:
in - the plaintext to be encrypted.
in_offset - the start of data within the in buffer.
out - where the ciphertext will be stored.
length - the length to encrypt.

decrypt

public abstract void decrypt(byte[] in,
                             int in_offset,
                             byte[] out,
                             int out_offset,
                             int length)
Deprecated. 
This function decrypts a block of data. The contents of the array in remain unchanged, and the result is stored in the array out. However, array in and array out can be the same.

Parameters:
in - the ciphertext to be decrypted.
in_offset - the start of data within the in buffer.
out - where the plaintext will be stored.
length - the length to decrypt.

keyLength

public abstract int keyLength()
Deprecated. 
This function returns the length of the key for this cipher.

Returns:
the length (in bytes) of the key used with this cipher