org.eclipse.emf.ecore.resource
Interface URIConverter.Cipher

All Known Implementing Classes:
AESCipherImpl, CryptoCipherImpl, DESCipherImpl
Enclosing interface:
URIConverter

public static interface URIConverter.Cipher

An interface to be implemented by encryption service providers.

Since:
2.2.0

Method Summary
 java.io.InputStream decrypt(java.io.InputStream inputStream)
          Decrypts the specified input stream.
 java.io.OutputStream encrypt(java.io.OutputStream outputStream)
          Encrypts the specified output stream.
 void finish(java.io.InputStream inputStream)
          This method is invoked after the decrypted input stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing internal cache.
 void finish(java.io.OutputStream outputStream)
          This method is invoked after the encrypted output stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing an internal cache.
 

Method Detail

encrypt

java.io.OutputStream encrypt(java.io.OutputStream outputStream)
                             throws java.lang.Exception
Encrypts the specified output stream.

Parameters:
outputStream -
Returns:
an encrypted output stream
Throws:
java.lang.Exception

finish

void finish(java.io.OutputStream outputStream)
            throws java.lang.Exception
This method is invoked after the encrypted output stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing an internal cache.

Parameters:
outputStream - the encrypted stream returned by encrypt(OutputStream).
Throws:
java.lang.Exception

decrypt

java.io.InputStream decrypt(java.io.InputStream inputStream)
                            throws java.lang.Exception
Decrypts the specified input stream.

Parameters:
inputStream -
Returns:
a decrypted input stream
Throws:
java.lang.Exception

finish

void finish(java.io.InputStream inputStream)
            throws java.lang.Exception
This method is invoked after the decrypted input stream is used allowing the Cipher implementation to do any maintenance work required, such as flushing internal cache.

Parameters:
inputStream - the stream returned by decrypt(InputStream).
Throws:
java.lang.Exception

Copyright 2001-2012 IBM Corporation and others.
All Rights Reserved.