Interface ConnectionSecurityLayer


public interface ConnectionSecurityLayer
An interface for providing additional connection security to a connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes of any system resources or security-sensitive information that this connection security layer might be using.
    byte[]
    unwrap(byte[] incoming, int offset, int len)
    Unwraps a byte array received from the peer.
    byte[]
    wrap(byte[] outgoing, int offset, int len)
    Wraps a byte array to be sent to the peer.
  • Method Details

    • dispose

      void dispose()
      Disposes of any system resources or security-sensitive information that this connection security layer might be using. Invoking this method invalidates this instance.
    • unwrap

      byte[] unwrap(byte[] incoming, int offset, int len) throws LdapException
      Unwraps a byte array received from the peer.
      Parameters:
      incoming - A non-null byte array containing the encoded bytes from the peer.
      offset - The starting position in incoming of the bytes to be unwrapped.
      len - The number of bytes from incoming to be unwrapped.
      Returns:
      A non-null byte array containing the unwrapped bytes.
      Throws:
      LdapException - If incoming cannot be successfully unwrapped.
    • wrap

      byte[] wrap(byte[] outgoing, int offset, int len) throws LdapException
      Wraps a byte array to be sent to the peer.
      Parameters:
      outgoing - A non-null byte array containing the unencoded bytes to be sent to the peer.
      offset - The starting position in outgoing of the bytes to be wrapped.
      len - The number of bytes from outgoing to be wrapped.
      Returns:
      A non-null byte array containing the wrapped bytes.
      Throws:
      LdapException - If outgoing cannot be successfully wrapped.