@Test public void ecdhTest() { String privkey1 = "82fc9947e878fc7ed01c6c310688603f0a41c8e8704e5b990e8388343b0fd465"; String privkey2 = "5f706787ac72c1080275c1f398640fb07e9da0b124ae9734b28b8d0f01eda586"; ECKey aliceKeyPair = ECKey.fromPrivate(Utils.HEX.decode(privkey1), true); ECKey bobKeyPair = ECKey.fromPrivate(Utils.HEX.decode(privkey2), true); KeyCrypterECDH keyExchangeCrypter = new KeyCrypterECDH(); KeyParameter keyParameter = keyExchangeCrypter.deriveKey(aliceKeyPair, bobKeyPair); assertEquals("5935d0476af9df2998efb60383adf2ff23bc928322cfbb738fca88e49d557d7e", Utils.HEX.encode(keyParameter.getKey())); }
@Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { throw new UnsupportedOperationException("use deriveKey(ECKey, ECKey) instead"); }
KeyCrypterECDH extends KeyCrypterAESCBC { @Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { throw new UnsupportedOperationException("use deriveKey(ECKey, ECKey) instead"); } }
KeyCrypterECDH extends KeyCrypterAESCBC { @Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { throw new UnsupportedOperationException("use deriveKey(ECKey, ECKey) instead"); }  }
KeyCrypterECDH extends KeyCrypterAESCBC { @Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { throw new UnsupportedOperationException("use deriveKey(ECKey, ECKey) instead"); }  @Override KeyParameter deriveKey(CharSequence password); KeyParameter deriveKey(ECKey secretKey, ECKey publicKey); @Override EncryptionType getUnderstoodEncryptionType(); @Override String toString(); }
KeyCrypterECDH extends KeyCrypterAESCBC { @Override public KeyParameter deriveKey(CharSequence password) throws KeyCrypterException { throw new UnsupportedOperationException("use deriveKey(ECKey, ECKey) instead"); }  @Override KeyParameter deriveKey(CharSequence password); KeyParameter deriveKey(ECKey secretKey, ECKey publicKey); @Override EncryptionType getUnderstoodEncryptionType(); @Override String toString();  }