SHOW Signed

net.rim.device.api.crypto
Class StreamDecryptor

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--net.rim.device.api.crypto.CryptoInputStream
              |
              +--net.rim.device.api.crypto.DecryptorInputStream
                    |
                    +--net.rim.device.api.crypto.StreamDecryptor
Direct Known Subclasses:
CFBDecryptor, ECIESDecryptor, PRNGDecryptor

public abstract class StreamDecryptor
extends DecryptorInputStream

StreamDecryptor is an abstract class which contains functionality common to all stream decryptors. A stream decryptor is an decryption scheme which decrypts data one byte at a time, instead of in blocks.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0

Fields inherited from class net.rim.device.api.crypto.CryptoInputStream
_inputStream
 
Constructor Summary
 Category: Signed StreamDecryptor(InputStream input)
          Creates a StreamDecryptor object based on an input stream that contains the encrypted data.
 
Method Summary
 Category: Signed protected abstract  void decrypt(byte[] data, int offset, int length)
          Decrypts data according to the specific implementation of the chosen stream cipher.
 Category: Signed  int read(byte[] data, int offset, int length)
          Reads up to the specified number of bytes from this input stream into an array of bytes.
 
Methods inherited from class net.rim.device.api.crypto.CryptoInputStream
available, close, getAlgorithm, getInputStream, markSupported, read, read
 
Methods inherited from class java.io.InputStream
mark, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamDecryptor

public StreamDecryptor(InputStream input)
Creates a StreamDecryptor object based on an input stream that contains the encrypted data.

Parameters:
input - The input stream used for reading the encrypted data from.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

read

public int read(byte[] data,
                int offset,
                int length)
         throws IOException
Description copied from class: CryptoInputStream
Reads up to the specified number of bytes from this input stream into an array of bytes. This method blocks until some input is available.

Overrides:
read in class CryptoInputStream
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

decrypt

protected abstract void decrypt(byte[] data,
                                int offset,
                                int length)
                         throws CryptoTokenException
Decrypts data according to the specific implementation of the chosen stream cipher. The data should be decrypted in place.

Parameters:
data - A byte array containing the input to the stream cipher.
offset - The offset, or initial position within the array, of the information to decrypt.
length - The length, in bytes, of the information to decrypt.
Throws:
CryptoTokenException - Thrown when an error occurs with the crypto token or the crypto token is invalid.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.