|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.encryption.ARCFour
public class ARCFour
This class is an implementation of the alleged RC4 algorithm.
Constructor Summary | |
---|---|
ARCFour()
Constructor. |
Method Summary | |
---|---|
void |
setKey(byte[] key)
This will reset the key to be used. |
void |
write(byte[] data,
int offset,
int len,
OutputStream output)
This will encrypt and write the data. |
void |
write(byte[] data,
OutputStream output)
This will encrypt and write the data. |
void |
write(byte aByte,
OutputStream output)
This will encrypt and write the next byte. |
void |
write(InputStream data,
OutputStream output)
This will encrypt and write the data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ARCFour()
Method Detail |
---|
public void setKey(byte[] key)
key
- The RC4 key used during encryption.public void write(byte aByte, OutputStream output) throws IOException
aByte
- The byte to encrypt.output
- The stream to write to.
IOException
- If there is an error writing to the output stream.public void write(byte[] data, OutputStream output) throws IOException
data
- The data to encrypt.output
- The stream to write to.
IOException
- If there is an error writing to the output stream.public void write(InputStream data, OutputStream output) throws IOException
data
- The data to encrypt.output
- The stream to write to.
IOException
- If there is an error writing to the output stream.public void write(byte[] data, int offset, int len, OutputStream output) throws IOException
data
- The data to encrypt.offset
- The offset into the array to start reading data from.len
- The number of bytes to attempt to read.output
- The stream to write to.
IOException
- If there is an error writing to the output stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |