|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.OutputStream
org.cryptonode.jncryptor.AES256JNCryptorOutputStream
public class AES256JNCryptorOutputStream
Writes RNCryptor-format (version 3) data in a stream fashion. The stream must be closed to finish writing the data and output the HMAC value.
| Constructor Summary | |
|---|---|
AES256JNCryptorOutputStream(OutputStream out,
char[] password)
Creates an output stream for password-encrypted data. |
|
AES256JNCryptorOutputStream(OutputStream out,
char[] password,
int iterations)
Creates an output stream for password-encrypted data, using a specific number of PBKDF iterations. |
|
AES256JNCryptorOutputStream(OutputStream out,
SecretKey encryptionKey,
SecretKey hmacKey)
Creates an output stream for key-encrypted data. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream. |
void |
write(byte[] b,
int off,
int len)
Writes bytes to the encrypted output stream. |
void |
write(int b)
Writes one byte to the encrypted output stream. |
| Methods inherited from class java.io.OutputStream |
|---|
flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AES256JNCryptorOutputStream(OutputStream out,
SecretKey encryptionKey,
SecretKey hmacKey)
throws CryptorException
out - the OutputStream to write the JNCryptor data toencryptionKey - the key to encrypt withhmacKey - the key to calculate the HMAC with
CryptorException
public AES256JNCryptorOutputStream(OutputStream out,
char[] password,
int iterations)
throws CryptorException
out - the OutputStream to write the JNCryptor data topassword - the passworditerations - the number of PBKDF iterations to perform
CryptorException
public AES256JNCryptorOutputStream(OutputStream out,
char[] password)
throws CryptorException
out - the OutputStream to write the JNCryptor data topassword - the password
CryptorException| Method Detail |
|---|
public void write(int b)
throws IOException
write in class OutputStreamb - the byte to write
IOException - if an I/O error occurs
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - a buffer of bytes to writeoff - the offset into the bufferlen - the number of bytes to write (starting from the offset)
IOException - if an I/O error occurs
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOException - if an I/O error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||