Search code examples
c#cryptographycrypto++

Crypto++ Lib in C#


I am using the Crypto++ library for using various encryption algorithms.

I know the library is written using c++ as the language, but I want to use the SAME library in C#. How can I convert this library code to c#?

The reason I want to do this is to make it easier to compare between this library and the other C# libraries in my project.

I am using VISUAL STUDIO 2010.


Solution

  • I haven't used this library yet but if it is a normal .dll you can use "DllImport" like

    [DllImport("cryptoplusplus.dll")]
    public static extern int ExportToCall(int argument);
    

    However if it is just C++, you would have to compile an assembly first.