|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.deployment.transformers.SampleEncryptionTransformer
public class SampleEncryptionTransformer
Sample payload transformer for the File System Receiver (FSR). Encrypts the contents of the file being transmitted over the wire to a File System Receiver. The intention of this class is to be simple sample code rather than being highly secure. In particular this class uses password based encryption via a symetric key rather than a more secure (and complex) key strategy. The password will be held in plain text in the spring configuration files. Nevertheless this class will give some protection against network snooping. Enabling TripleDES requires "unlimited strength policy files" for that algorithm to be available in a Sun JVM.
javax.crypto
Constructor Summary | |
---|---|
SampleEncryptionTransformer()
|
Method Summary | |
---|---|
java.io.InputStream |
addFilter(java.io.InputStream in,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
Decrypts inbound stream, |
java.io.OutputStream |
addFilter(java.io.OutputStream out,
java.lang.String path,
java.lang.String mimeType,
java.lang.String encoding)
Encrypted outgoing stream |
java.lang.String |
getCipherName()
|
int |
getIterationCount()
|
java.lang.String |
getPassword()
|
void |
setCipherName(java.lang.String cipherName)
The name of the cipher to use such as "PBEWithMD5AndDES". |
void |
setIterationCount(int iterationCount)
|
void |
setPassword(java.lang.String password)
Sets the password |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SampleEncryptionTransformer()
Method Detail |
---|
public java.io.OutputStream addFilter(java.io.OutputStream out, java.lang.String path, java.lang.String mimeType, java.lang.String encoding)
addFilter
in interface DeploymentTransportOutputFilter
out
- the stream to encryptpath
- the path of the file to encryptmimeType
- the encoding of the fileencoding
- the mimeType of the file
public java.io.InputStream addFilter(java.io.InputStream in, java.lang.String path, java.lang.String mimeType, java.lang.String encoding)
addFilter
in interface DeploymentTransportInputFilter
out
- the stream to decryptpath
- the path of the file to decrypt
public void setCipherName(java.lang.String cipherName)
cipherName
- the name of the cipher to usepublic java.lang.String getCipherName()
public void setPassword(java.lang.String password)
password
- the password used to generate a keypublic java.lang.String getPassword()
public void setIterationCount(int iterationCount)
public int getIterationCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |