public static class AESBinaryManager.CipherAndDigestOutputStream extends FilterOutputStream
CipherOutputStream
that also does a digest of the original stream at
the same time.Modifier and Type | Field and Description |
---|---|
protected Cipher |
cipher |
protected byte[] |
digest |
protected MessageDigest |
messageDigest |
protected OutputStream |
out |
Constructor and Description |
---|
CipherAndDigestOutputStream(OutputStream out,
Cipher cipher,
MessageDigest messageDigest) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
byte[] |
getDigest() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
write
protected OutputStream out
protected MessageDigest messageDigest
protected byte[] digest
public CipherAndDigestOutputStream(OutputStream out, Cipher cipher, MessageDigest messageDigest)
public byte[] getDigest()
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
Copyright © 2016 Nuxeo SA. All rights reserved.