|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.szegedi.spring.web.jsflow.codec.ConfidentialityCodec
public class ConfidentialityCodec
A codec that will encrypt the flowstate when encoding, and decrypt it upon
decoding. It can be used with
ClientSideFlowStateStorage
when there
is a concern that confidential information might be contained in the flow
state. If you use it, then it is recommended to put it into a
CompositeCodec
and precede it
with a CompressionCodec
, as
compression improves the security of encryption. You might also want to
consider enclosing it (or the composite codec) into a
PooledCodec
to improve
performance, especially when using some sort of password-based encryption as
it has high cipher initialization time requirements. Note however that if
you are not concerned about secrecy, but just want to prevent the client from
tampering with or forging a false flowstate, then you should use an
IntegrityCodec
instead.
Constructor Summary | |
---|---|
ConfidentialityCodec()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
OneWayCodec |
createDecoder()
Create a one-way single-threaded, nonshared codec instance able to decode a state as received from the client or from an upstream codec. |
OneWayCodec |
createEncoder()
Create a one-way single-threaded, nonshared codec instance able to encode a state as should be sent to a client or a downstream codec. |
void |
setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
Sets any optional algorithm parameters |
void |
setChainingAndPadding(java.lang.String chainingAndPadding)
Sets the block chaining and padding mode, i.e. |
void |
setProvider(java.lang.String provider)
Sets the name of the security provider to use. |
void |
setSecretKey(java.security.Key secretKey)
Sets the secret key used for encryption and decryption. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfidentialityCodec()
Method Detail |
---|
public void setSecretKey(java.security.Key secretKey)
GeneratedSecretKeyFactory
or better yet a KeySpecSecretKeyFactory
secretKey
- the secret keypublic void setAlgorithmParameters(java.security.AlgorithmParameters algorithmParameters)
algorithmParameters
- the algorithm parameterspublic void setProvider(java.lang.String provider)
provider
- the name of the security provider to use or null.public void setChainingAndPadding(java.lang.String chainingAndPadding)
chainingAndPadding
- the block chaining and padding mode, or null
for algorithm defaults.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
public OneWayCodec createDecoder() throws java.lang.Exception
BinaryStateCodec
createDecoder
in interface BinaryStateCodec
java.lang.Exception
public OneWayCodec createEncoder() throws java.lang.Exception
BinaryStateCodec
createEncoder
in interface BinaryStateCodec
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |