public void ByteArrayStartsWith5ZeroesTest(byte a, byte b, byte c, byte d, bool expected) { var cracker = new Cracker(); var result = cracker.StartsWith5Zeroes(new[] { a, b, c, d }); Assert.Equal(expected, result); }
public void TestPart1() { var cracker = new Cracker(); var password = cracker.GeneratePassword1("abc", 8); Assert.Equal("18f47a30", password); }
public void TestHashValidation(string input, bool expected) { var cracker = new Cracker(); var hash = _md5.ComputeHash(Encoding.ASCII.GetBytes(input)); var isValid = cracker.StartsWith5Zeroes(hash); Assert.Equal(expected, isValid); }
public static void Main() { var cracker = new Cracker(); //cracker.GeneratePassword1("ugkcyxxp", 8); cracker.GeneratePassword2("ugkcyxxp", 8); //cracker.GeneratePassword2("abc", 8); }