0

Which class of them should I use in order to encrypt a parameter and post it to an API Call?

I have to encrypt some parameters first before sending them to the API and I do not know which class should I use.

LopDev
  • 823
  • 10
  • 26
  • 2
    Does this answer your question? [What is the difference between Aes and AesManaged](https://stackoverflow.com/questions/45473884/what-is-the-difference-between-aes-and-aesmanaged) – JonasH Jun 25 '20 at 15:01
  • 2
    You should probably use Aes instead of Rijndael unless you have some specific reason to do otherwise. – JonasH Jun 25 '20 at 15:03
  • @JonasH , is the Rijndael and AES the same ?? – LopDev Jun 26 '20 at 07:55
  • @JonasH, this does not answer my question , please open the question again – LopDev Jun 26 '20 at 07:55
  • I would assume that the linked answer would be just as applicable for Rijndael as it is for Aes. Do you have any reason to suspect otherwise? As for Rijndael vs AES, see https://stackoverflow.com/questions/748622/differences-between-rijndael-and-aes – JonasH Jun 26 '20 at 08:06
  • @JonasH , I just need to know if I have to use RijndaelManaged or Rijndael class, I must use Rijndael encryption type in an API call and I just need help , should I use RijndaelManaged or Rijndael class iin C# , why are you making this so difficult for me,kindly help me with this. – LopDev Jun 26 '20 at 08:19
  • I do now know how to answer that question in any other way than the asnwer in the Aes/AesManaged question, just search replace Aes with Rijndael. What exactly is it you you do not understand/need help with? The answer clearly states that Rijndael class is abstract, so cannot be used directly, and this should be obvious from the documentation. – JonasH Jun 26 '20 at 08:27
  • @JonasH, so you say that I should use RijndaelManaged right? – LopDev Jun 26 '20 at 09:13
  • The problem is that I guess that all readers agree that the difference between `Aes` / `AesManaged` clearly shows the same difference as between `Rijndael` and `RijndaelManaged`. Which one you should use is **up to you**. If there are any *specific questions about the difference* then feel free to ask them in this or another question. – Maarten Bodewes Jun 27 '20 at 11:12
  • @MaartenBodewes, the problem that I have is here , https://stackoverflow.com/questions/62569677/how-can-i-encypt-a-parameter-with-rijndael-in-c , as I can see you know thinks well about cryptography , so kindly help me with this question , I have to use OAuth 2.0 and encrypt with Rijndael. please help me – LopDev Jun 29 '20 at 07:26
  • Please don't do that. I'll look at questions, answers when I have the time. That's a horribly under-specified question you've got there and I've already voted to close it. If there is an API that you need to support, then please provide the protocol for the encryption and what you did to try and implement it. Protocol design and generic code samples are off topic. – Maarten Bodewes Jun 29 '20 at 07:38
  • @MaartenBodewes, I just need some help with this, if you can help me with this I would appreciate it , tell me what info do you need to provide you in order to explain me how to format the 1st Key and the IV Key, thank you in advance – LopDev Jun 29 '20 at 07:47
  • There is no formatting. AES keys and IV's generally consist of random or randomized bytes. IV is generally the block size but it depends on the block cipher mode of operation. The key can be 128, 192 or 256 for the subset of Rijndael that is AES, and the block size is 128 bits for that same subset. – Maarten Bodewes Jun 29 '20 at 11:34

0 Answers0