NHSE/NHSE.Core/Encryption/EncryptedSaveFile.cs
2020-03-27 17:54:17 -07:00

21 lines
764 B
C#

namespace NHSE.Core
{
public readonly struct EncryptedSaveFile
{
public readonly byte[] Data;
public readonly byte[] Header;
public EncryptedSaveFile(byte[] data, byte[] header)
{
Data = data;
Header = header;
}
#region Equality Comparison
public override bool Equals(object obj) => obj is EncryptedSaveFile r && r == this;
public override int GetHashCode() => Data.GetHashCode();
public static bool operator !=(EncryptedSaveFile left, EncryptedSaveFile right) => !(left == right);
public static bool operator ==(EncryptedSaveFile left, EncryptedSaveFile right) => left.Data == right.Data && left.Header == right.Header;
#endregion
}
}