public static void HashBlock_InvalidEnum_Test() { string md5Hash = "f59b7efafd800e27b47a488d30615c73"; byte[] utf8Hash = System.Text.Encoding.UTF8.GetBytes(md5Hash); byte[] test = { 5 }; test = test.Concat(utf8Hash).ToArray(); HashBlock hashBlock = new HashBlock(test); Assert.AreEqual(hashBlock.Algorithm, HashAlgorithm.Invalid); }
public override bool Equals(Object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } HashBlock p = (HashBlock)obj; return((this.Algorithm == p.Algorithm) && (this.Value == p.Value)); }
public static void HashBlock_InvalidEnum_Test() { string md5Hash = "f59b7efafd800e27b47a488d30615c73"; byte[] utf8Hash = System.Text.Encoding.UTF8.GetBytes(md5Hash); byte[] test = { 5 }; test = test.Concat(utf8Hash).ToArray(); HashBlock hashBlock = new HashBlock(test); Assert.AreEqual(hashBlock.Algorithm, HashAlgorithm.Invalid); }
public PacketOption(string Comment = null, PacketBlockFlags PacketFlag = null, HashBlock Hash = null) { this.Comment = Comment; this.PacketFlag = PacketFlag; this.Hash = Hash; }
public EnchantedPacketOption(string Comment = null, PacketBlockFlags PacketFlag = null, long? DropCount = null, HashBlock Hash = null) { this.Comment = Comment; this.PacketFlag = PacketFlag; this.DropCount = DropCount; this.Hash = Hash; }