An effective method for encrypting a license file?

前端 未结 9 1610
走了就别回头了
走了就别回头了 2021-01-29 18:58

For a web application, I would like to create a simple but effective licensing system. In C#, this is a little difficult, since my decryption method could be viewed by anyone wi

9条回答
  •  灰色年华
    2021-01-29 19:34

    Use a signed XML file. Sign it with the private key part of a keypair and check it with the public key part in your software. This gives you the oppertunity to check whether the license has been altered and also to check if the license file is valid.

    Signing and checking of a signed XML file is documented in the MSDN.

    It's of course logical that you sign the license file at your own company and send the license file to the customer who then places the license file in a folder for you to read.

    Of course, people can cut out/hack your distributed assembly and rip out the xml sign checking, but then again, they will always be able to do so, no matter what you do.

提交回复
热议问题