Nagaveni Katari

Nagaveni Katari

  • 1.6k
  • 106
  • 7.7k

Encrypt the summetric key using publickey and cipher Algorithm

May 18 2023 7:38 AM

Encrypt generated symmetric key of size 128 bits using banks public key with cipher algorithm Name/ MODE/ Padding for encryption using RSA / ECB / PKCS1Padding and convert the output to Base64 encoded string.

Public Key: a11b4f86cf186d127caa05db929d6f41

this is my code to generate symmetric key:

           AesCryptoServiceProvider aes = new AesCryptoServiceProvider();
            aes.GenerateKey();
           string aesKeyBase64 = Convert.ToBase64String(aes.Key);
            return aesKeyBase64;


Answers (4)