public final class CryptoStreamFactoryImpl extends java.lang.Object implements CryptoStreamFactory
| Constructor and Description |
|---|
CryptoStreamFactoryImpl()
Constructor
|
CryptoStreamFactoryImpl(byte[] salt,
int count,
java.lang.String algorithm,
java.lang.String providerName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.io.InputStream |
getInputStream(java.io.InputStream is)
Creates a decrypting input stream.
|
java.io.InputStream |
getInputStream(java.io.InputStream is,
char[] password)
Creates an decrypting input stream
|
static CryptoStreamFactory |
getInstance()
Factory method to get a default instance
|
java.io.OutputStream |
getOutputStream(java.io.OutputStream os,
char[] password)
Creates an encrypting output stream
|
java.io.InputStream |
getSmartInputStream(java.io.InputStream is)
Creates a smart decrypting input stream.
|
java.io.InputStream |
getSmartInputStream(java.io.InputStream is,
char[] password)
Creates an decrypting input stream
|
static void |
setInstance(CryptoStreamFactory instance)
Set the default instance from an external application.
|
public CryptoStreamFactoryImpl()
public CryptoStreamFactoryImpl(byte[] salt,
int count,
java.lang.String algorithm,
java.lang.String providerName)
salt - the salt for the PBE algorithmcount - the iteration for PBEParameterSpecalgorithm - the algorithm to be usedproviderName - the name of the JCE provide to b usedpublic static CryptoStreamFactory getInstance()
public static void setInstance(CryptoStreamFactory instance)
instance - the new default instancepublic java.io.InputStream getInputStream(java.io.InputStream is)
throws java.security.GeneralSecurityException,
java.io.IOException
CryptoStreamFactorygetInputStream in interface CryptoStreamFactoryis - the input stream to be wrappedjava.security.GeneralSecurityException - creating the input stream failedjava.io.IOException - creating the input stream failedCryptoStreamFactory.getInputStream(java.io.InputStream)public java.io.InputStream getInputStream(java.io.InputStream is,
char[] password)
throws java.security.GeneralSecurityException,
java.io.IOException
CryptoStreamFactorygetInputStream in interface CryptoStreamFactoryis - the input stream to be wrappedpassword - the password to be usedjava.security.GeneralSecurityException - creating the input stream failedjava.io.IOException - creating the input stream failedCryptoStreamFactory.getInputStream(java.io.InputStream,char[])public java.io.InputStream getSmartInputStream(java.io.InputStream is)
throws java.security.GeneralSecurityException,
java.io.IOException
CryptoStreamFactorygetSmartInputStream in interface CryptoStreamFactoryis - the input stream to be wrappedjava.security.GeneralSecurityException - creating the input stream failedjava.io.IOException - creating the input stream failedCryptoStreamFactory.getSmartInputStream(java.io.InputStream)public java.io.InputStream getSmartInputStream(java.io.InputStream is,
char[] password)
throws java.security.GeneralSecurityException,
java.io.IOException
CryptoStreamFactorygetSmartInputStream in interface CryptoStreamFactoryis - the input stream to be wrappedpassword - the password to be usedjava.security.GeneralSecurityException - creating the input stream failedjava.io.IOException - creating the input stream failedCryptoStreamFactory.getSmartInputStream(java.io.InputStream,char[])public java.io.OutputStream getOutputStream(java.io.OutputStream os,
char[] password)
throws java.security.GeneralSecurityException,
java.io.IOException
CryptoStreamFactorygetOutputStream in interface CryptoStreamFactoryos - the output stream to be wrappedpassword - the password to be usedjava.security.GeneralSecurityException - creating the ouptut stream failedjava.io.IOException - creating the ouptut stream failedCryptoStreamFactory.getOutputStream(java.io.OutputStream, char[])Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.