Ejemplo n.º 1
0
        public string Decrypt(string xmlkeystring, Algorithms typo, string datatodecrypt)
        {
            RSA rsaer = RSACry.ReadKeyString(xmlkeystring);

            byte[] result = RSACry.DecryptIt(rsaer, typo, datatodecrypt);
            return(System.Text.Encoding.UTF8.GetString(result));
        }
Ejemplo n.º 2
0
        public string Encrypt(string xmlkeystring, Algorithms typo, string datatoencrypt)
        {
            RSA rsaer = RSACry.ReadKeyString(xmlkeystring);

            byte[] result = RSACry.EncryptIt(rsaer, typo, datatoencrypt);
            return(System.Convert.ToBase64String(result));
        }