Exemple #1
0
        public bool Equals(PrivateKey other)
        {
            if (!base.Equals(other))
            {
                return(false);
            }

            if (!KeyUtility.IsEqual(p, other.p))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(q, other.q))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(dp, other.dp))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(dq, other.dq))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(inverseQ, other.inverseQ))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(d, other.d))
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
        public bool Equals(PublicKey other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!KeyUtility.IsEqual(modulus, other.modulus))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(exponent, other.exponent))
            {
                return(false);
            }

            return(true);
        }
Exemple #3
0
        public bool Equals(SymmetricKey other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!KeyUtility.IsEqual(key, other.key))
            {
                return(false);
            }
            if (!KeyUtility.IsEqual(iv, other.iv))
            {
                return(false);
            }

            return(true);
        }