/// <inheritdoc /> public override int GetHashCode() { unchecked { int hashCode = (KeyConfirmation != null ? KeyConfirmation.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (KeyConfirmationVerifiedOutput != null ? KeyConfirmationVerifiedOutput.GetHashCodeExt() : 0); hashCode = (hashCode * 397) ^ KeyDerivation.GetHashCode(); hashCode = (hashCode * 397) ^ SymmetricCipher.GetHashCode(); hashCode = (hashCode * 397) ^ Authentication.GetHashCode(); hashCode = (hashCode * 397) ^ AuthenticationVerifiedOutput.GetHashCodeExt(); return(hashCode); } }
/// <inheritdoc /> public PayloadItem CloneSafely() { return(new PayloadItem { Type = Type, Path = String.Copy(Path), ExternalLength = ExternalLength, InternalLength = InternalLength, FormatName = String.Copy(FormatName), FormatData = FormatData.DeepCopy(), SymmetricCipher = SymmetricCipher.CloneSafely(), SymmetricCipherKey = null, Authentication = Authentication.CloneSafely(), AuthenticationKey = null, AuthenticationVerifiedOutput = null, KeyConfirmation = KeyConfirmation.CloneSafely(), KeyConfirmationVerifiedOutput = null, KeyDerivation = KeyDerivation.CloneSafely() }); }
/// <inheritdoc /> public bool Equals(SymmetricManifestCryptographyConfiguration other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return ((KeyConfirmation == null ? other.KeyConfirmation == null : KeyConfirmation.Equals(other.KeyConfirmation)) && (KeyConfirmationVerifiedOutput == null ? other.KeyConfirmation == null : KeyConfirmationVerifiedOutput.SequenceEqualShortCircuiting(other.KeyConfirmationVerifiedOutput)) && KeyDerivation.Equals(other.KeyDerivation) && SymmetricCipher.Equals(other.SymmetricCipher) && Authentication.Equals(other.Authentication) && AuthenticationVerifiedOutput.SequenceEqualShortCircuiting(other.AuthenticationVerifiedOutput)); }
/// <inheritdoc /> public bool Equals(PayloadItem other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (Type.Equals(other.Type) && String.Equals(Path, other.Path, Type != PayloadItemType.KeyAction ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal) && InternalLength == other.InternalLength && ExternalLength == other.ExternalLength && (FormatName == null ? other.FormatName == null : String.Equals(FormatName, other.FormatName, StringComparison.Ordinal)) && (FormatData == null ? other.FormatData == null : FormatData.SequenceEqualShortCircuiting(other.FormatData)) && SymmetricCipher.Equals(other.SymmetricCipher) && Authentication.Equals(other.Authentication) && (AuthenticationKey == null ? other.AuthenticationKey == null : AuthenticationKey.SequenceEqualShortCircuiting(other.AuthenticationKey)) && AuthenticationVerifiedOutput.SequenceEqualShortCircuiting(other.AuthenticationVerifiedOutput) && (KeyConfirmation == null ? other.KeyConfirmation == null : KeyConfirmation.Equals(other.KeyConfirmation)) && (KeyConfirmationVerifiedOutput == null ? other.KeyConfirmationVerifiedOutput == null : KeyConfirmationVerifiedOutput.SequenceEqualShortCircuiting(other.KeyConfirmationVerifiedOutput)) && KeyDerivation == null ? other.KeyDerivation == null : KeyDerivation.Equals((other.KeyDerivation))); }