Esempio n. 1
0
 /// <inheritdoc />
 public bool Equals(KeyDerivationConfiguration other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Salt.SequenceEqualShortCircuiting(other.Salt) &&
            String.Equals(FunctionName, other.FunctionName, StringComparison.OrdinalIgnoreCase) &&
            (FunctionConfiguration == null
                ? other.FunctionConfiguration == null
                : FunctionConfiguration.SequenceEqualShortCircuiting(other.FunctionConfiguration)));
 }
        /// <inheritdoc />
        public bool Equals(AuthenticationConfiguration other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(String.Equals(FunctionName, other.FunctionName, StringComparison.OrdinalIgnoreCase) &&
                   FunctionConfiguration == null ? other.FunctionConfiguration == null : FunctionConfiguration.SequenceEqualShortCircuiting(other.FunctionConfiguration) &&
                   KeySizeBits.Equals(other.KeySizeBits) &&
                   Nonce == null ? other.Nonce == null : Nonce.SequenceEqualShortCircuiting(other.Nonce) &&
                   Salt == null ? other.Salt == null : Salt.SequenceEqualShortCircuiting(other.Salt) &&
                   AdditionalData == null ? other.AdditionalData == null : AdditionalData.SequenceEqualShortCircuiting(other.AdditionalData) &&
                   OutputSizeBits.Equals(other.OutputSizeBits));
        }