/// <summary> /// Calls ECDH_compute_key() /// </summary> /// <returns>The key.</returns> /// <param name="b">The blue component.</param> /// <param name="buf">Buffer.</param> /// <param name="kdf">Kdf.</param> public int ComputeKey(Key b, byte[] buf, ComputeKeyHandler kdf) { ComputeKeyThunk thunk = new ComputeKeyThunk(kdf); return(Native.ExpectSuccess( Native.ECDH_compute_key(buf, buf.Length, b.PublicKey.Handle, ptr, thunk.Wrapper) )); }
public ComputeKeyThunk(ComputeKeyHandler kdf) { this.kdf = kdf; }
/// <summary> /// Calls ECDH_compute_key() /// </summary> /// <returns>The key.</returns> /// <param name="b">The blue component.</param> /// <param name="buf">Buffer.</param> /// <param name="kdf">Kdf.</param> public int ComputeKey(Key b, byte[] buf, ComputeKeyHandler kdf) { ComputeKeyThunk thunk = new ComputeKeyThunk(kdf); return Native.ExpectSuccess( Native.ECDH_compute_key(buf, buf.Length, b.PublicKey.Handle, ptr, thunk.Wrapper) ); }