Example #1
0
        public void RSA_PEM_EncryptWithDecrypt()
        {
            string data = "hello word!";//"MD5",
            //data = "1234567890123456";
            //data = "abcdefghildjfdfj";
            //data = ".,keikdiodjkdfoj";
            //data = " ";
            //data = "string decryptResult = RSAHelper.DecryptPEM(privateKeyPEM, encryptResult)";
            string encryptResult = RSAHelper.EncryptPEM(publicKeyPEM, data);
            string decryptResult = RSAHelper.DecryptPEM(privateKeyPEM, encryptResult);

            Debug.Print(encryptResult);
            Debug.Print(decryptResult);
            Assert.IsTrue(data == decryptResult);
            //if(encryptResult.Length!=172)
            //{
            //    int a = 0;
            //    int b = 0 / a;
            //}
            //if (data != decryptResult)
            //{
            //    int a = 0;
            //    int b = 0 / a;
            //}
        }