org.apache.fulcrum.jce.crypto
Interface CryptoStreamFactory

All Known Implementing Classes:
CryptoStreamFactoryImpl

public interface CryptoStreamFactory

Interface for creating encrypting/decrypting streams.

Author:
Siegfried Goeschl

Method Summary
 java.io.InputStream getInputStream(java.io.InputStream is)
          Creates a decrypting input stream.
 java.io.InputStream getInputStream(java.io.InputStream is, char[] password)
          Creates an decrypting input stream
 java.io.OutputStream getOutputStream(java.io.OutputStream os, char[] password)
          Creates an encrypting output stream
 java.io.InputStream getSmartInputStream(java.io.InputStream is)
          Creates a smart decrypting input stream.
 java.io.InputStream getSmartInputStream(java.io.InputStream is, char[] password)
          Creates an decrypting input stream
 

Method Detail

getInputStream

java.io.InputStream getInputStream(java.io.InputStream is)
                                   throws java.security.GeneralSecurityException,
                                          java.io.IOException
Creates a decrypting input stream.

Parameters:
is - the input stream to be wrapped
Returns:
an decrypting input stream
Throws:
java.security.GeneralSecurityException - creating the input stream failed
java.io.IOException - creating the input stream failed

getInputStream

java.io.InputStream getInputStream(java.io.InputStream is,
                                   char[] password)
                                   throws java.security.GeneralSecurityException,
                                          java.io.IOException
Creates an decrypting input stream

Parameters:
is - the input stream to be wrapped
password - the password to be used
Returns:
an decrypting input stream
Throws:
java.security.GeneralSecurityException - creating the input stream failed
java.io.IOException - creating the input stream failed

getSmartInputStream

java.io.InputStream getSmartInputStream(java.io.InputStream is)
                                        throws java.security.GeneralSecurityException,
                                               java.io.IOException
Creates a smart decrypting input stream.

Parameters:
is - the input stream to be wrapped
Returns:
an decrypting input stream
Throws:
java.security.GeneralSecurityException - creating the input stream failed
java.io.IOException - creating the input stream failed

getSmartInputStream

java.io.InputStream getSmartInputStream(java.io.InputStream is,
                                        char[] password)
                                        throws java.security.GeneralSecurityException,
                                               java.io.IOException
Creates an decrypting input stream

Parameters:
is - the input stream to be wrapped
password - the password to be used
Returns:
an decrypting input stream
Throws:
java.security.GeneralSecurityException - creating the input stream failed
java.io.IOException - creating the input stream failed

getOutputStream

java.io.OutputStream getOutputStream(java.io.OutputStream os,
                                     char[] password)
                                     throws java.security.GeneralSecurityException,
                                            java.io.IOException
Creates an encrypting output stream

Parameters:
os - the output stream to be wrapped
password - the password to be used
Returns:
an decrypting input stream
Throws:
java.security.GeneralSecurityException - creating the ouptut stream failed
java.io.IOException - creating the ouptut stream failed


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.