com.caucho.hessian.security
Class X509Signature

java.lang.Object
  extended by com.caucho.hessian.io.HessianEnvelope
      extended by com.caucho.hessian.security.X509Signature

public class X509Signature
extends HessianEnvelope


Constructor Summary
X509Signature()
           
 
Method Summary
 java.lang.String getAlgorithm()
          Gets the encryption algorithm for the content.
 java.security.cert.X509Certificate getCertificate()
          The X509 certificate to obtain the public key of the recipient.
 java.security.PrivateKey getPrivateKey()
          The key to obtain the private key of the recipient.
 java.security.SecureRandom getSecureRandom()
          The random number generator for the shared secrets.
 void setAlgorithm(java.lang.String algorithm)
          Sets the encryption algorithm for the content.
 void setCertificate(java.security.cert.X509Certificate cert)
          The X509 certificate to obtain the public key of the recipient.
 void setPrivateKey(java.security.PrivateKey key)
          The private key.
 void setSecureRandom(java.security.SecureRandom random)
          The random number generator for the shared secrets.
 Hessian2Input unwrap(Hessian2Input in)
          Unwrap the Hessian input stream with this envelope.
 Hessian2Input unwrapHeaders(Hessian2Input in)
          Unwrap the envelope after having read the envelope code ('E') and the envelope method.
 Hessian2Output wrap(Hessian2Output out)
          Wrap the Hessian output stream in an envelope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X509Signature

public X509Signature()
Method Detail

setAlgorithm

public void setAlgorithm(java.lang.String algorithm)
Sets the encryption algorithm for the content.


getAlgorithm

public java.lang.String getAlgorithm()
Gets the encryption algorithm for the content.


getCertificate

public java.security.cert.X509Certificate getCertificate()
The X509 certificate to obtain the public key of the recipient.


setCertificate

public void setCertificate(java.security.cert.X509Certificate cert)
The X509 certificate to obtain the public key of the recipient.


getPrivateKey

public java.security.PrivateKey getPrivateKey()
The key to obtain the private key of the recipient.


setPrivateKey

public void setPrivateKey(java.security.PrivateKey key)
The private key.


getSecureRandom

public java.security.SecureRandom getSecureRandom()
The random number generator for the shared secrets.


setSecureRandom

public void setSecureRandom(java.security.SecureRandom random)
The random number generator for the shared secrets.


wrap

public Hessian2Output wrap(Hessian2Output out)
                    throws java.io.IOException
Description copied from class: HessianEnvelope
Wrap the Hessian output stream in an envelope.

Specified by:
wrap in class HessianEnvelope
Throws:
java.io.IOException

unwrap

public Hessian2Input unwrap(Hessian2Input in)
                     throws java.io.IOException
Description copied from class: HessianEnvelope
Unwrap the Hessian input stream with this envelope. It is an error if the actual envelope does not match the expected envelope class.

Specified by:
unwrap in class HessianEnvelope
Throws:
java.io.IOException

unwrapHeaders

public Hessian2Input unwrapHeaders(Hessian2Input in)
                            throws java.io.IOException
Description copied from class: HessianEnvelope
Unwrap the envelope after having read the envelope code ('E') and the envelope method. Called by the EnvelopeFactory for dynamic reading of the envelopes.

Specified by:
unwrapHeaders in class HessianEnvelope
Throws:
java.io.IOException