mirror of
https://github.com/kwsch/NHSE.git
synced 2026-03-24 10:44:15 -05:00
23 lines
743 B
C#
23 lines
743 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
|
|
}
|
|
} |