Skip navigation links 
 
oracle.security.xmlsec.enc
Class EncryptOutputStream
java.lang.Object
  
java.io.OutputStream
      
java.io.FilterOutputStream
          
oracle.security.xmlsec.enc.EncryptOutputStream
- All Implemented Interfaces:
 
- java.io.Closeable, java.io.Flushable
 
- 
public class EncryptOutputStream
 
- extends java.io.FilterOutputStream
 
This class is similar to the CipherOutputStream, except that it does two special things to conform to XML encryption, a) it emits the IntializationVector at the beginning of the stream and b) it emits a padding at the end of the stream .
Note: the cipher object must be set up for NoPadding, or for ISO10126Padding
If you are using a nonce, you must write the nonce into the EncryptOutputStream in the beginning, that way it will get encrypted.
- Since:
 
- release specific (what release of product did this appear in)
 
- Version:
 
- $Header: ldap/java/src/oracle/security/xmlsec/enc/EncryptOutputStream.java /main/1 2008/12/17 15:42:25 pdatta Exp $
 
 
 
| Fields inherited from class java.io.FilterOutputStream | 
out | 
  
 
  
 
| Method Summary | 
 void | 
close() 
            | 
 void | 
write(byte[] b, int off, int len) 
            | 
 void | 
write(int b) 
            | 
 
| Methods inherited from class java.io.FilterOutputStream | 
flush, write | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
EncryptOutputStream
public EncryptOutputStream(java.io.OutputStream os,
                           javax.crypto.Cipher c)
                    throws java.io.IOException
- 
- Throws:
 
java.io.IOException 
 
close
public void close()
           throws java.io.IOException
- 
- Specified by:
 
close in interface java.io.Closeable 
- Overrides:
 
close in class java.io.FilterOutputStream 
 
- 
- Throws:
 
java.io.IOException 
 
write
public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
- 
- Overrides:
 
write in class java.io.FilterOutputStream 
 
- 
- Throws:
 
java.io.IOException 
 
write
public void write(int b)
           throws java.io.IOException
- 
- Overrides:
 
write in class java.io.FilterOutputStream 
 
- 
- Throws:
 
java.io.IOException 
 
Skip navigation links 
 
Copyright © 2005, 2011 , Oracle. All rights reserved.