Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.net.ssl.provider
Interface SecurityParameters  view SecurityParameters download SecurityParameters.java

All Known Implementing Classes:
GNUSecurityParameters, JCESecurityParameters

interface SecurityParameters

The interface that all security parameters used by Jessie must implement. Security parameters handle all transforming of data, including encryption, authentication, and compression.


Method Summary
 byte[] decrypt(byte[] fragment, ProtocolVersion version, ContentType type)
          Decrypts, verifies, and inflates a fragment received.
 byte[] encrypt(byte[] buf, int off, int len, ContentType type)
          Deflates, authenticates, and encrypts a fragment to be sent.
 int getFragmentLength()
          Returns the maximum size that plaintext fragments may be.
 ProtocolVersion getVersion()
          Returns the version of texts being sent.
 void reset()
          Set all crypto primitives to null, meaning that any calls to #encrypt(byte[],int,int,org.metastatic.jessie.provider.ContentType) or #decrypt(byte[],org.metastatic.jessie.provider.ProtocolVersion,org.metastatic.jessie.provider.ContentType) will perform the identity transformation.
 void setDeflating(boolean deflate)
          Turns zlib deflating on or off.
 void setFragmentLength(int fragmentLength)
          Sets the maximum size that plaintext fragments may be.
 void setInCipher(java.lang.Object cipher)
          Set the cipher used to decrypt incoming fragments.
 void setInflating(boolean inflate)
          Turns zlib inflating on or off.
 void setInMac(java.lang.Object mac)
          Set the MAC used to verify incoming fragments.
 void setOutCipher(java.lang.Object cipher)
          Set the cipher used to encrypt outgoing fragments.
 void setOutMac(java.lang.Object mac)
          Set the MAC used to authenticating outgoinging fragments.
 void setVersion(ProtocolVersion version)
          Sets the version of texts being sent.
 

Method Detail

decrypt

public byte[] decrypt(byte[] fragment,
                      ProtocolVersion version,
                      ContentType type)
               throws MacException,
                      OverflowException,
                      javax.net.ssl.SSLException
Decrypts, verifies, and inflates a fragment received. The fragment is just the data field of a text object, without the version, type, and length fields. An exception is thrown if any step fails.


encrypt

public byte[] encrypt(byte[] buf,
                      int off,
                      int len,
                      ContentType type)
               throws OverflowException,
                      javax.net.ssl.SSLException
Deflates, authenticates, and encrypts a fragment to be sent.


reset

public void reset()
Set all crypto primitives to null, meaning that any calls to #encrypt(byte[],int,int,org.metastatic.jessie.provider.ContentType) or #decrypt(byte[],org.metastatic.jessie.provider.ProtocolVersion,org.metastatic.jessie.provider.ContentType) will perform the identity transformation.


getVersion

public ProtocolVersion getVersion()
Returns the version of texts being sent.


setVersion

public void setVersion(ProtocolVersion version)
Sets the version of texts being sent. This affects the #encrypt(byte[],int,int,org.metastatic.jessie.provider.ContentType) method.


setDeflating

public void setDeflating(boolean deflate)
Turns zlib deflating on or off.


setInflating

public void setInflating(boolean inflate)
Turns zlib inflating on or off.


getFragmentLength

public int getFragmentLength()
Returns the maximum size that plaintext fragments may be.


setFragmentLength

public void setFragmentLength(int fragmentLength)
Sets the maximum size that plaintext fragments may be.


setInCipher

public void setInCipher(java.lang.Object cipher)
Set the cipher used to decrypt incoming fragments. The parameter must be appropriate for the implementation.


setOutCipher

public void setOutCipher(java.lang.Object cipher)
Set the cipher used to encrypt outgoing fragments. The parameter must be appropriate for the implementation.


setInMac

public void setInMac(java.lang.Object mac)
Set the MAC used to verify incoming fragments. The parameter must be appropriate for the implementation.


setOutMac

public void setOutMac(java.lang.Object mac)
Set the MAC used to authenticating outgoinging fragments. The parameter must be appropriate for the implementation.