/// <summary> /// Compare params /// </summary> /// <param name="parameters"></param> /// <param name="other"></param> /// <returns></returns> public static bool SameAs(this EccParams parameters, EccParams other) { if (parameters == null) { return(other == null); } if (other == null) { return(false); } if (other.Curve != parameters.Curve) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.X, parameters.X)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.Y, parameters.Y)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.T, parameters.T)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.D, parameters.D)) { return(false); } return(true); }
/// <summary> /// Compare params /// </summary> /// <param name="parameters"></param> /// <param name="other"></param> /// <returns></returns> public static bool SameAs(this RsaParams parameters, RsaParams other) { if (parameters == null) { return(other == null); } if (other == null) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.D, parameters.D)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.DP, parameters.DP)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.DQ, parameters.DQ)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.E, parameters.E)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.N, parameters.N)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.P, parameters.P)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.Q, parameters.Q)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.QI, parameters.QI)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.T, parameters.T)) { return(false); } return(true); }
/// <summary> /// Compare params /// </summary> /// <param name="parameters"></param> /// <param name="other"></param> /// <returns></returns> public static bool SameAs(this AesParams parameters, AesParams other) { if (parameters == null) { return(other == null); } if (other == null) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.K, parameters.K)) { return(false); } if (!KeyEx.SameNoLeadingZeros(other.T, parameters.T)) { return(false); } return(true); }