Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Software Key Secure Encryption
#1
How can I securely encrypt a registration key for software? Thanks in advance.

e.g:
 
Code:
Copy      Help
using System;
using System.Linq;
using GemBox.Document;

ComponentInfo.SetLicense("DN-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

var document = DocumentModel.Load(@"C:\Users\Administrator\Desktop\toPrint.docx");
int pageCount = document.GetPaginator().Pages.Count;
Console.WriteLine(pageCount);
#2
What is the purpose? Will you share the code or compiled .exe with others and they should not see the key?
#3
GemBox.Document is a commercial component, and if the activation key is exposed, it could be misused, leading to potential issues.  
I would like to know what viable solutions exist in this situation.
#4
OK, I assume the C# code is for sharing as .exe. To encrypt the key you can use Convert2.AesEncryptS and Convert2.AesDecryptS.
#5
Thanks for your help.  
I looked at the relevant examples in the cookbook, but I couldn't understand how to use them.


Forum Jump:


Users browsing this thread: 2 Guest(s)