public void GenerateSecret(X448PublicKeyParameters publicKey, byte[] buf, int off) { byte[] encoded = new byte[X448.PointSize]; publicKey.Encode(encoded, 0); if (!X448.CalculateAgreement(data, 0, encoded, 0, buf, off)) { throw new InvalidOperationException("X448 agreement failed"); } }
public void GenerateSecret(X448PublicKeyParameters publicKey, byte[] buf, int off) { byte[] encoded = new byte[X448.PointSize]; publicKey.Encode(encoded, 0); X448.ScalarMult(data, 0, encoded, 0, buf, off); }