Example #1
0
        public void IndicesAreCorrectWithStreching()
        {
            var gen    = new DataGenerator("abc", 2016);
            var finder = new KeyFinder(gen);

            Assert.Equal(10, finder.KeyIndices().First());
        }
Example #2
0
        public string Solve(string[] input)
        {
            var gen    = new DataGenerator(input[0], this.StretchCount);
            var finder = new KeyFinder(gen);
            var index  = finder.KeyIndices().Skip(63).First();

            return(index.ToString());
        }
Example #3
0
        public void IndicesAreCorrectForSampleSalt()
        {
            var gen     = new DataGenerator("abc");
            var finder  = new KeyFinder(gen);
            var indices = finder.KeyIndices().Take(64).ToArray();

            Assert.Equal(39, indices[0]);
            Assert.Equal(92, indices[1]);
            Assert.Equal(22728, indices[63]);
        }