CONTEXT: I'm developing an application that requires a licensing process to add some security to it. The application is major C#, but it has a small portion (an independent module, in fact) of it written in C++.
The latter already has a licensing process implemented, which in summary consists of: when the app initializes, it looks for a license file containing encrypted info, generated by the developers based on some customer info (a string
). If the file is valid, the app continues your execution, otherwise, it shuts down. The important part of it is that it uses the wincrypt.h
library to add cryptography to strings.
DESIRE: Both parts (or modules) must have a license-based security and should share the same license file.
PROBLEM: I'm trying to adapt the security process described before to C# in order to use it on the other part of the app. I haven't found a way of using wincrypt.h
functions to do so (maybe because my knownledge of C# is not that great, or maybe because I simply can't do that). I ended up using RSA, but I ended up with two different cryptograph methods.
QUESTION: Is there a way of using wincrypt.h
in C#? If not, is there any other way of developing a (en|de)cription of a string
process that can be used in both C++ and C#?
Any help is appreciated.