Esempio n. 1
0
        public void Md5ComputeShouldReturnValidNumberOfCharacters(int hashLength)
        {
            var sut  = new Base62HasherMd5(hashLength);
            var hash = sut.Compute(CLEAR_TEXT);

            Assert.StrictEqual(hashLength, hash.Length);
        }
Esempio n. 2
0
        public void Md5ComputeShouldReturnValidCharacters(string clearText)
        {
            var sut  = new Base62HasherMd5(5);
            var hash = sut.Compute(clearText);

            bool flag       = true;
            var  enumerator = hash.GetEnumerator();

            while (flag && enumerator.MoveNext())
            {
                flag = SYMBOLS.Contains(enumerator.Current.ToString());
            }

            Assert.True(flag);
        }