public String Encrypt(string dataToEncrypt)
 {
     var aes = new Aes();
     var rsa = new Rsa(_publicKey);
     var aesKey = aes.GenerateKey();
     var encryptedData = aes.Encrypt(dataToEncrypt, aesKey);
     var encryptedAesKey = rsa.Encrypt(aesKey);
     return GetPrefix() + encryptedAesKey + "$" + encryptedData;
 }
        public String Encrypt(string dataToEncrypt)
        {
            var aes             = new Aes();
            var rsa             = new Rsa(_publicKey);
            var aesKey          = aes.GenerateKey();
            var encryptedData   = aes.Encrypt(dataToEncrypt, aesKey);
            var encryptedAesKey = rsa.Encrypt(aesKey);

            return(GetPrefix() + encryptedAesKey + "$" + encryptedData);
        }