com.ibm.di.security
Class EncryptedReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
com.ibm.di.security.EncryptedReader
- All Implemented Interfaces:
- Closeable, Readable
public class EncryptedReader
- extends BufferedReader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncryptedReader
public EncryptedReader(InputStream stream)
EncryptedReader
public EncryptedReader(Reader stream)
getInputStream
public InputStream getInputStream()
throws Exception
- Throws:
Exception
prefetch
public void prefetch()
throws Exception
- Throws:
Exception
useKey
public void useKey(String keyPath)
throws Exception
- Throws:
Exception
setKey
public void setKey(SecurityCrypto key)
setAlgorithm
public void setAlgorithm(String cipherAlgorithm)
getAlgorithm
public String getAlgorithm()
readLine
public String readLine()
throws IOException
- Overrides:
readLine
in class BufferedReader
- Throws:
IOException
isEncrypted
public static boolean isEncrypted(File f)
throws IOException
- Throws:
IOException
decrypt
public static byte[] decrypt(String cipher,
String pwd,
byte[] data)
throws Exception
- Throws:
Exception