def test_get_ecdh_key():
    privkey = decode_hex('332143e9629eedff7d142d741f896258f5a1bfab54dab2121d3ec5000093d74b')
    remote_pubkey = decode_hex('f0d2b97981bd0d415a843b5dfe8ab77a30300daab3658c578f2340308a2da1a07f0821367332598b6aa4e180a41e92f4ebbae3518da847f0b1c0bbfe20bcf4e1')
    agree_expected = decode_hex('ee1418607c2fcfb57fda40380e885a707f49000a5dda056d828b7d9bd1f29a08')
    e = crypto.ECCx(raw_privkey=privkey)
    agree = e.get_ecdh_key(remote_pubkey)
    assert (agree == agree_expected)
def test_get_ecdh_key():
    privkey = decode_hex('332143e9629eedff7d142d741f896258f5a1bfab54dab2121d3ec5000093d74b')
    remote_pubkey = decode_hex('f0d2b97981bd0d415a843b5dfe8ab77a30300daab3658c578f2340308a2da1a07f0821367332598b6aa4e180a41e92f4ebbae3518da847f0b1c0bbfe20bcf4e1')
    agree_expected = decode_hex('ee1418607c2fcfb57fda40380e885a707f49000a5dda056d828b7d9bd1f29a08')
    e = crypto.ECCx(raw_privkey=privkey)
    agree = e.get_ecdh_key(remote_pubkey)
    assert (agree == agree_expected)