示例#1
0
        private static void DoHash()
        {
            var input      = "bgvyzdsv";
            var hashThing  = new _4AdventCoins();
            var hashNumber = hashThing.GetHashNumber(input, 5);

            Console.WriteLine($"Answer to 4a is {hashNumber}");
            Console.WriteLine($"Answer to 4b is {hashThing.GetHashNumber(input, 6, hashNumber)}");
        }
示例#2
0
        public void TestAdventCoins(string secretKey, int expectedNumber)
        {
            var sut = new _4AdventCoins();

            Assert.AreEqual(expectedNumber, sut.GetHashNumber(secretKey, 5));
        }