I have an application which encrypt XML data using rijndaelmanaged algorithm to encrypt the data. My task is to convert C# code to C++ so that application doesn't depends upon .net framework. Kindly tell me about any library which have rijndaelmanaged algorithm and other cryptography techniques like passwordDeriveByte etc.
-
msdn.microsoft.com/en-us/library/windows/desktop/… – SLaks Feb 6 '12 at 16:47
Here's one public-domain Rijndael algorithm that (according to the docs) will also compile as C++: Rijndael C/C++ Algorithm. Obviously if it compiles for both languages it probably won't conform to C++ best practices, but it will work.
Here's another one that was written in C++, derived from a Java implementation: CodeProject C++ Rijndael
Understand that RijndaelManaged is exclusive to the .NET Framework; by its definition as a "managed" algorithm it is written and compiled into MSIL and is not a "wrapper" for unmanaged code. There are other Rijndael implementations that are "wrappers", and such implementations can be accessed "natively" by simply using the Windows CSP that is being "wrapped", such as the Microsoft AES Cryptographic Service Provider which ships with Windows desktop and server versions starting from Win2000.
You might want to take a look at Crypto++ which is a portable C++ cryptography library which implements amongst others AES (Rijndael)
This site contains an implementation of the Rijndael encryption algorithm:
http://www.efgh.com/software/rijndael.htm
Also, here is a CodeProject article related to the topic:
http://www.codeproject.com/Articles/1380/A-C-Implementation-of-the-Rijndael-Encryption-Decr