コード例 #1
0
ファイル: Program.cs プロジェクト: Citr0s/EncryptionTesting
        public static void TestTwo()
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();

            var encryptedString = DesEncryptor.Encrypt("password", "012345678901234567890123");
            var plainString     = DesEncryptor.Decrypt(encryptedString, "012345678901234567890123");

            stopwatch.Stop();
            var elapsed = stopwatch.ElapsedMilliseconds;

            Console.WriteLine($"took: {elapsed}ms resultEncrypted: {encryptedString} resultDecrypted: {plainString}");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Citr0s/EncryptionTesting
        public static void TestFour()
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();
            for (var i = 0; i < 100; i++)
            {
                var encryptedString = DesEncryptor.Encrypt("password", "012345678901234567890123");
                var plainString     = DesEncryptor.Decrypt(encryptedString, "012345678901234567890123");
            }
            stopwatch.Stop();

            var elapsed = stopwatch.ElapsedMilliseconds;

            Console.WriteLine($"took: {elapsed}ms");
        }