Class java.crypt.CipherFeedback
All Packages Class Hierarchy This Package Previous Next Index
Class java.crypt.CipherFeedback
java.crypt.StreamCipher
|
+----java.crypt.CipherFeedback
- public class CipherFeedback
- extends StreamCipher
Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/)
All rights reserved.
-
cipher
-
-
currentByte
-
-
ivBlock
-
-
length
-
-
xorBlock
-
-
CipherFeedback(BlockCipher, byte[])
-
-
decrypt(byte[], int, byte[], int, int)
- This function decrypts a block of data.
-
encrypt(byte[], int, byte[], int, int)
- This function encrypts a block of data.
-
keyLength()
- This function returns the length of the key for this cipher.
N.B. The library writer should also implement a
public static final int KEY_LENGTH for any classes that derive from
this.
ivBlock
protected byte ivBlock[]
xorBlock
protected byte xorBlock[]
cipher
protected BlockCipher cipher
currentByte
protected int currentByte
length
protected int length
CipherFeedback
public CipherFeedback(BlockCipher cipher0,
byte iv0[])
encrypt
public 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 will not be changed,
but will instead store the result in the array out.
The arrays can, however, be the same.
- Parameters:
- in - The plain text to be encrypted.
- in_offset - The offset within the in buffer.
- out - Where the encrypted cipher text will be stored.
- out_offset - The offset within the out buffer.
- length - The length to encrypt.
- Overrides:
- encrypt in class StreamCipher
decrypt
public 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 will not be changed,
but will instead store the result in the array out.
The arrays can, however, be the same.
- Parameters:
- in - The cipher text to be decrypted.
- in_offset - The offset within the in buffer.
- out - Where the decrypted plain text will be stored.
- out_offset - The offset within the out buffer.
- length - The length to decrypt.
- Overrides:
- decrypt in class StreamCipher
keyLength
public int keyLength()
- This function returns the length of the key for this cipher.
N.B. The library writer should also implement a
public static final int KEY_LENGTH for any classes that derive from
this.
- Overrides:
- keyLength in class StreamCipher
All Packages Class Hierarchy This Package Previous Next Index