Esempio n. 1
0
        public static string RSAEncrypt(this string s)
        {
            const int keySize    = 2048;
            var       key        = AsymmetricEncryption.PemToXml(Settings.RSAKey);
            var       base64Card = Convert.ToBase64String(Encoding.UTF8.GetBytes(s));

            return(AsymmetricEncryption.EncryptText(base64Card, keySize, key));
        }