NHSE/NHSE.Core/Encryption/CryptoFile.cs
Kurt 6c40e1c769
Initial v1.7.0 Support (#445)
* Pre-patch preparations

* Update magic values

* Check formatting characters directly rather than string compare

"Brown".StartsWith("\u000e")
>true
what

let's be paranoid here, because .NET Core behaves differently from .NET framework.

* Update FileHashRevision.cs

Postbox with the massive decrease in size; likely the same mutation caused the other massive decreases.

* Dump item names

* Update flag definitions

* Update item info

* Add feathers to bug list

Might remove later.

* Update RecipeList.cs

* Update ItemRemakeUtil.cs

* Update stack details

* Update offsets

* Update MainSaveOffsets17.cs

* Update GameLists.cs
2021-01-27 20:04:51 -08:00

24 lines
744 B
C#

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