org.apache.fulcrum.yaafi.framework.crypto
Class CryptoStreamFactory

java.lang.Object
  extended by org.apache.fulcrum.yaafi.framework.crypto.CryptoStreamFactory

public class CryptoStreamFactory
extends Object

Factory class to get a decrypting input stream for reading configuration files. The implementation uses dynamic class loading to make decryption an optional feature which is highly desirable when avoiding the ECCN export code problems.

Author:
Siegfried Goeschl

Constructor Summary
CryptoStreamFactory()
           
 
Method Summary
static InputStream getDecryptingInputStream(InputStream is, String isEncrypted)
          Create a (potentially) decrypting input stream using the default password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoStreamFactory

public CryptoStreamFactory()
Method Detail

getDecryptingInputStream

public static InputStream getDecryptingInputStream(InputStream is,
                                                   String isEncrypted)
                                            throws Exception
Create a (potentially) decrypting input stream using the default password.

Parameters:
is - the input stream to be decrypted
isEncrypted - the encryption mode (true|false|auto)
Returns:
a decrypting input stream
Throws:
Exception - reading the input stream failed


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.