|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
net.rim.device.api.crypto.CryptoInputStream
net.rim.device.api.crypto.DecryptorInputStream
net.rim.device.api.crypto.StreamDecryptor
net.rim.device.api.crypto.PRNGDecryptor
public final class PRNGDecryptor
The PRNGDecryptor is used in conjunction with a PseudoRandomSource to decrypt data provided to this class in a stream interface to the calling class.
A PRNG represents a Pseudo Random Number Generator.
It provides a similar relationship or functionality that the BlockDecryptor uses for BlockDecryptorEngines. That is, it allows you to use a PseudoRandomSource as an input stream instead of relying on the decryption mechanisms exposed in the PseudoRandomSource class.
PRNGEncryptor| Field Summary |
|---|
| Fields inherited from class net.rim.device.api.crypto.CryptoInputStream |
|---|
_inputStream |
| Constructor Summary | ||
|---|---|---|
|
PRNGDecryptor(PseudoRandomSource keystream,
InputStream input)
Creates a PRNGDecryptor object based on an input stream
and a keystream that will create random numbers and decrypt the
ciphertext with them. |
|
| Method Summary | ||
|---|---|---|
|
protected void |
decrypt(byte[] data,
int offset,
int length)
Decrypts data according to the specific implementation of the chosen stream cipher. |
|
String |
getAlgorithm()
Returns the name of the encryption algorithm used, eg "ARC4". |
| Methods inherited from class net.rim.device.api.crypto.StreamDecryptor |
|---|
read |
| Methods inherited from class net.rim.device.api.crypto.CryptoInputStream |
|---|
available, close, 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 |
|---|
public PRNGDecryptor(PseudoRandomSource keystream,
InputStream input)
PRNGDecryptor object based on an input stream
and a keystream that will create random numbers and decrypt the
ciphertext with them.
keystream - A PseudoRandomSource object to recreate the original random numbers in
order to decrypt the input stream.input - An inputstream object containing the plaintext.| Method Detail |
|---|
public String getAlgorithm()
getAlgorithm in class CryptoInputStream
protected void decrypt(byte[] data,
int offset,
int length)
throws CryptoTokenException
StreamDecryptor
decrypt in class StreamDecryptordata - 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.
CryptoTokenException - Thrown when an error occurs with the crypto
token or the crypto token is invalid.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal