예제 #1
0
파일: Program.cs 프로젝트: youssefsobhy/RSA
        public static void Bonus2()
        {
            int start = Environment.TickCount;

            RSAKeyGenerator keyGenerator = new RSAKeyGenerator();
            RSAKey          key          = keyGenerator.GenerateRSAKeys();
            int             end          = Environment.TickCount;

            float seconds = (end - start) / 1000.0f;

            Console.WriteLine(key.ToString());
            Console.WriteLine("TOTAL   TIME = " + (end - start).ToString().PadRight(6) + " ms = " + (seconds).ToString().PadRight(5) + " sec");
        }
 private void init()
 {
     this.keyGenerator = new RSAKeyGenerator();
 }