0

How can I encrypt a parameter variable using the encryption method Rijndael?

I would like to encrypt some parameters in order to post them in an API call.
The key should be in a specific form , 1st Key + IV Key.
In addition , the 1st key should have a specific format.

If anyone is able to provide a code sample for this, it would be awesome.

LopDev
  • 823
  • 10
  • 26
  • https://stackoverflow.com/questions/273452/using-aes-encryption-in-c-sharp or maybe https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rijndaelmanaged?redirectedfrom=MSDN&view=netcore-3.1#Y2262 (should have more updates) – nanu_nana Jun 25 '20 at 07:16
  • @nanu_nana, what should I do if the 1st key should have a specific format? – LopDev Jun 25 '20 at 07:20
  • microsoft doc says "This algorithm supports key lengths of 128, 192, or 256 bits; defaulting to 256 bits". AES is a block chiffre and they have fixed key sizes. Generating, storing and deleting cryptographic keys is a complicated topic, I would inform myself before handling such topics – nanu_nana Jun 25 '20 at 07:25
  • Can you define what you mean by "specific format" – nanu_nana Jun 25 '20 at 07:30
  • @nanu_nana, which is the difference between RijndaelManaged and Rijndael , because in your link you have RijndaelManaged.. – LopDev Jun 25 '20 at 13:15
  • RijndaelManaged is .NET code, Rijndael is a call into Windows. BTW, please don't use Rijndael, use AES instead. AES is the 'official' alg, not Rijndael. – MichaelHoward-MSFT Jul 01 '20 at 01:24

0 Answers0