Class CryptoStreamFactory
java.lang.Object
org.apache.fulcrum.yaafi.framework.crypto.CryptoStreamFactory
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
getDecryptingInputStream
(InputStream is, String isEncrypted) Create a (potentially) decrypting input stream using the default password.
-
Constructor Details
-
CryptoStreamFactory
public CryptoStreamFactory()
-
-
Method Details
-
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 decryptedisEncrypted
- the encryption mode (true|false|auto)- Returns:
- a decrypting input stream
- Throws:
Exception
- reading the input stream failed
-