Package org.eclipse.net4j.util.security

## Class DiffieHellman.Server

- java.lang.Object
- - org.eclipse.net4j.util.security.DiffieHellman.Server

- Enclosing class:
    DiffieHellman

      public static class DiffieHellman.Server
      extends java.lang.Object

  Executes the server-side of the Diffie-Hellman key agreement protocol.
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `DiffieHellman.Server.Challenge` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `DEFAULT_CYPHER_TRANSFORMATION` | Deprecated. As of 3.8 the default cipher transformation is "AES/CBC/PKCS5Padding".
    `static java.lang.String` | `DEFAULT_SECRET_ALGORITHM` | Deprecated. As of 3.8 the default secret algorithm is "AES".

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Server​(java.lang.String realm)` |
    `Server​(java.lang.String realm, int diffieHellmanKeySize)` |
    `Server​(java.lang.String realm, int diffieHellmanKeySize, int secretAlgorithmKeyLen, java.lang.String secretAlgorithm, java.lang.String cipherTransformation)` |
    `Server​(java.lang.String realm, int diffieHellmanKeySize, java.lang.String secretAlgorithm, java.lang.String cipherTransformation)` |
    `Server​(java.lang.String realm, java.security.KeyPairGenerator keyPairGenerator, int secretAlgorithmKeyLen, java.lang.String secretAlgorithm, java.lang.String cipherTransformation)` |
    `Server​(java.lang.String realm, javax.crypto.spec.DHParameterSpec dhParamSpec)` |
    `Server​(java.lang.String realm, javax.crypto.spec.DHParameterSpec dhParamSpec, int secretAlgorithmKeyLen, java.lang.String secretAlgorithm, java.lang.String cipherTransformation)` |
    `Server​(java.lang.String realm, javax.crypto.spec.DHParameterSpec dhParamSpec, java.lang.String secretAlgorithm, java.lang.String cipherTransformation)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `DiffieHellman.Server.Challenge` | `getChallenge()` |
    `java.lang.String` | `getRealm()` |
    `byte[]` | `handleResponse​(DiffieHellman.Client.Response response)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_SECRET_ALGORITHM

          @Deprecated
          public static final java.lang.String DEFAULT_SECRET_ALGORITHM

      Deprecated.
      As of 3.8 the default secret algorithm is "AES".
      See Also:
        Constant Field Values

    - #### DEFAULT_CYPHER_TRANSFORMATION

          @Deprecated
          public static final java.lang.String DEFAULT_CYPHER_TRANSFORMATION

      Deprecated.
      As of 3.8 the default cipher transformation is "AES/CBC/PKCS5Padding".
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Server

          public Server​(java.lang.String realm,
                        java.security.KeyPairGenerator keyPairGenerator,
                        int secretAlgorithmKeyLen,
                        java.lang.String secretAlgorithm,
                        java.lang.String cipherTransformation)

      Since:
        3.8

    - #### Server

          public Server​(java.lang.String realm,
                        int diffieHellmanKeySize,
                        int secretAlgorithmKeyLen,
                        java.lang.String secretAlgorithm,
                        java.lang.String cipherTransformation)

      Since:
        3.8

    - #### Server

          public Server​(java.lang.String realm,
                        int diffieHellmanKeySize,
                        java.lang.String secretAlgorithm,
                        java.lang.String cipherTransformation)

      Since:
        3.8

    - #### Server

          public Server​(java.lang.String realm,
                        int diffieHellmanKeySize)

      Since:
        3.8

    - #### Server

          public Server​(java.lang.String realm)

    - #### Server

          public Server​(java.lang.String realm,
                        javax.crypto.spec.DHParameterSpec dhParamSpec,
                        int secretAlgorithmKeyLen,
                        java.lang.String secretAlgorithm,
                        java.lang.String cipherTransformation)

      Since:
        3.8

    - #### Server

          public Server​(java.lang.String realm,
                        javax.crypto.spec.DHParameterSpec dhParamSpec,
                        java.lang.String secretAlgorithm,
                        java.lang.String cipherTransformation)

    - #### Server

          public Server​(java.lang.String realm,
                        javax.crypto.spec.DHParameterSpec dhParamSpec)

  - ### Method Detail

    - #### getRealm

          public final java.lang.String getRealm()

    - #### getChallenge

          public final DiffieHellman.Server.Challenge getChallenge()

    - #### handleResponse

          public byte[] handleResponse​(DiffieHellman.Client.Response response)