0
    public string GetQCAsync(string UserLimit)
    {
        var DSet1 = _context.test.Where(x => x.Uid == 1).FirstOrDefault();

        var provider = new System.Security.Cryptography.RSACryptoServiceProvider();
        //provider.ImportParameters("aXb2uy4z");

        DSet1.NoOfUsers = provider.Encrypt(
            System.Text.Encoding.UTF8.GetBytes(UserLimit), true);

        string decryptedTest = System.Text.Encoding.UTF8.GetString(
            provider.Decrypt(DSet1.NoOfUsers, true));

        return decryptedTest;
    }

i tried this but this won't work i want to get integer value and to encrypt it and save the encrypted value in sql while saving and i have to get the actual[decrypted] value when edit

Rainy
  • 11
  • There are many questions that come to my mind when looking at this code. But most importantly may be: What exactly is not working? – ozerfrettelter Jan 12 '22 at 10:22
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 20 '22 at 19:06

0 Answers0