Ejemplo n.º 1
0
        static void testCryptoGraphy()
        {
            Write("Enter a massage :");
            string massage = ReadLine();

            Write("Enter a password :"******"Encrypted text :{cryptoText}");
            Write("Enter a password :"******"Decrypted text: {clearText}");
            }
            catch (CryptographicException cex)
            {
                WriteLine($"You Entered a wrong password! \nMore details: {cex.Message}");
            }
            catch (Exception ex)
            {
                WriteLine($"Non-Cryptographic Exception {ex.GetType().Name}, {ex.Message}");
            }
        }