| java.lang.Object com.sun.portal.kssl.Cipher com.sun.portal.kssl.RC4
RC4 | final class RC4 extends Cipher (Code) | | This class implements the ARCfour stream cipher
|
Method Summary | |
public void | RC4() | public int | doFinal(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) Process the final data record. | public byte | getAlgorithm() Get the alorithm (ALG_ARCFOUR). | public void | init(Key theKey, byte theMode, byte[] b, int off, int len) Initialize the alorithm with initial data. | public void | init(Key theKey, byte theMode) Initializes the cipher's S-boxes based on the key. | public int | transform(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) | public int | update(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) Update the current data record. |
RC4 | public void RC4()(Code) | | Constructor for algorithm 3 (ALG_ARCFOUR)
|
doFinal | public int doFinal(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) throws CryptoException(Code) | | Process the final data record.
Parameters: inBuf - input buffer of data Parameters: inOff - offset in the provided input buffer Parameters: inLen - length of data to be processed Parameters: outBuf - output buffer of data Parameters: outOff - offset in the provided output buffer number of bytes copied to output buffer exception: CryptoException - is thrown, if there are errors in the arguments |
getAlgorithm | public byte getAlgorithm()(Code) | | Get the alorithm (ALG_ARCFOUR).
algorithm 3 code |
init | public void init(Key theKey, byte theMode, byte[] b, int off, int len) throws CryptoException(Code) | | Initialize the alorithm with initial data. (Not supported)
Parameters: theKey - public key Parameters: theMode - mode of operation Parameters: b - buffer of data Parameters: off - offset in the provided buffer Parameters: len - length of data to be processed exception: CryptoException - is thrown, because the method is not supported. |
init | public void init(Key theKey, byte theMode) throws CryptoException(Code) | | Initializes the cipher's S-boxes based on the key.
This code is based on the cipher's description in
Bruce Schenier's "Applied Cryptography", Second Edition, pp 397-398,
ISBN 0-471-11709-9
Parameters: theKey - public key Parameters: theMode - mode of operation exception: CryptoException - is thrown, if there is an error in the arguments. |
transform | public int transform(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)(Code) | | Transform a buffer of data,
Parameters: inBuf - input buffer of data Parameters: inOff - offset in the provided input buffer Parameters: inLen - length of data to be processed Parameters: outBuf - output buffer of data Parameters: outOff - offset in the provided output buffer number of bytes copied to output buffer |
update | public int update(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) throws CryptoException(Code) | | Update the current data record.
Parameters: inBuf - input buffer of data Parameters: inOff - offset in the provided input buffer Parameters: inLen - length of data to be processed Parameters: outBuf - output buffer of data Parameters: outOff - offset in the provided output buffer number of bytes copied to output buffer exception: CryptoException - is thrown, if there are errors in the arguments |
Methods inherited from com.sun.portal.kssl.Cipher | abstract public int doFinal(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) throws CryptoException(Code)(Java Doc) abstract public byte getAlgorithm()(Code)(Java Doc) public static Cipher getInstance(byte alg, boolean ext) throws CryptoException(Code)(Java Doc) abstract public void init(Key theKey, byte theMode) throws CryptoException(Code)(Java Doc) abstract public void init(Key theKey, byte theMode, byte[] b, int off, int len) throws CryptoException(Code)(Java Doc) abstract public int update(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff) throws CryptoException(Code)(Java Doc)
|
|
|