static void Main(string[] args)
        {
            CreateHash hash = new CreateHash();

            Console.WriteLine(hash.MakeHash(HashType.MD5, "Valami"));
            Console.WriteLine(hash.MakeHash(HashType.MD5, "Valami", true));

            Console.WriteLine(hash.MakeHash(HashType.SHA512, "Valami"));
            Console.WriteLine(hash.MakeHash(HashType.SHA512, "Valami", true));

            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            CreateHash hash = new CreateHash();

            Console.WriteLine(hash.MakeHash(HashType.SHA1, "valami"));
            Console.ReadKey();
        }
        public void TestMd5(string elvart, string szoveg)
        {
            CreateHash hash = new CreateHash();
            var        sut  = hash.MakeHash(HashType.MD5, szoveg);

            Assert.AreEqual(elvart, sut);
        }
        public void SHA512Test(string szoveg, string elvart)
        {
            CreateHash hash = new CreateHash();
            var        sut  = hash.MakeHash(HashType.SHA512, szoveg);

            Assert.AreEqual(elvart, sut);
        }
        public void TestSHA512(string elvart, string szoveg)
        {
            //Arrange
            CreateHash hash = new CreateHash();
            //Act
            var sut = hash.MakeHash(HashType.SHA512, szoveg);

            //Assert
            Assert.AreEqual(elvart, sut);
        }