net.i2p.crypto.x25519

## Class X25519DH

- java.lang.Object
- - net.i2p.crypto.x25519.X25519DH

-     public class X25519DH
      extends Object

  DH wrapper around Noise's Curve25519 with I2P types.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SessionKey` | `dh(PrivateKey priv, PublicKey pub)` DH

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

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

- - ### Method Detail

    - #### dh

          public static SessionKey dh(PrivateKey priv,
                                      PublicKey pub)

      DH
      Parameters:
        `pub` - MUST have MSB high bit cleared, i.e. pub.getData()[31] & 0x80 == 0
      Returns:
        ECIES_X25519
      Throws:
        `IllegalArgumentException` - if not ECIES_X25519