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