Minor tweaks

no functional change
This commit is contained in:
Kurt
2021-01-28 07:07:41 -08:00
parent ef6e0f0987
commit f316ffce9e
3 changed files with 6 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
namespace NHSE.Core
{
public readonly struct CryptoFile
internal readonly ref struct CryptoFile
{
public readonly byte[] Data;
public readonly byte[] Key;
@@ -12,12 +12,5 @@ public CryptoFile(byte[] data, byte[] key, byte[] ctr)
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
}
}