Class cryptix.security.StreamCipher
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.security.StreamCipher

java.lang.Object
   |
   +----cryptix.security.StreamCipher

public class StreamCipher
extends Object
This abstract class is the basis for a stream cipher of any form.

Even though there is no constructor, there is a key length method so that the user can find the key length. There is no key in the base class because the key storage varies with cipher type, and is left to the designer of the derived class.

References

See also: Schneier, B., Applied Cryptography, Wiley, 1996, 2nd Ed.

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

Author:
Systemics Ltd
See Also:
BlockCipher, CipherFeedback, CFB

Constructor Index

 o StreamCipher()

Method Index

 o decrypt(byte[])
This function decrypts a block of data.
 o decrypt(byte[], byte[])
This function decrypts a block of data.
 o decrypt(byte[], int, byte[], int, int)
This function decrypts a block of data.
 o encrypt(byte[])
This function encrypts a block of data.
 o encrypt(byte[], byte[])
This function encrypts a block of data.
 o encrypt(byte[], int, byte[], int, int)
This function encrypts a block of data.
 o keyLength()
This function returns the length of the key for this cipher.

Constructors

 o StreamCipher
  public StreamCipher()

Methods

 o encrypt
  public final void encrypt(byte text[])
This function encrypts a block of data. The contents of the array will be changed.
Parameters:
text - The plaintext to be encrypted.
 o decrypt
  public final void decrypt(byte text[])
This function decrypts a block of data. The contents of the array will be changed.
Parameters:
text - The ciphertext to be decrypted.
 o encrypt
  public final void encrypt(byte in[],
                            byte out[])
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.
 o decrypt
  public final void decrypt(byte in[],
                            byte out[])
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.
 o encrypt
  public abstract void encrypt(byte in[],
                               int in_offset,
                               byte out[],
                               int out_offset,
                               int length)
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.
off_offset - The start of data within the out buffer.
length - The length to encrypt.
 o decrypt
  public abstract void decrypt(byte in[],
                               int in_offset,
                               byte out[],
                               int out_offset,
                               int length)
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.
off_offset - The start of data within the out buffer.
length - The length to decrypt.
 o keyLength
  public abstract int keyLength()
This function returns the length of the key for this cipher.
Returns:
s the length (in bytes) of the key used with this cipher

All Packages  Class Hierarchy  This Package  Previous  Next  Index