Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypt file (.licence) + verification?

Status
Not open for further replies.

TipGiver

Programmer
Sep 1, 2005
1,863
Hello,
Imagive the next:

I want my app when it loads to use a .licence file (it's just an extension). It should contain 3 strings like: 2006 string1 string2. These are very important because they are used in printing and in database.
(Specifically, the year locates and completes the path to the database, after being created - if necessary.)

So, if a user open the file, I dont care if he can recognize the data, but i dont want to be able to change them. I am not sure if this technique is called hashing, but either way or not, i need help on this.

To conclude, the app should not load if the validation of the .licence file fails. If it succeeds, then i will save these strings in variables for further use in the application.


Thanks on any guidance!
 
thanks, i'll give it a try and post again!
 
I have a question on this.

In Licence.cs file and in the routine 'License' (i think it is the constructor) there is:
Code:
key.FromXmlString(m_pubKeyString);
The declaration of 'm_pubKeyString' is:
Code:
private const string m_pubKeyString="[b]<RSAKeyValue><Modulus>[/b]vNcK8QuQA78kCez+Mc2gvtNuQP1nNYlT7BveNKKoFQ+WSERV7jh" +
						 "KTEKoBt/KFsY8tOVRNiPfNud/x9zzwA+lGgTHUlpSfKi7kOc5HHCxKcHk+GB35hBU19QnSQwA" + 
		                 "1YiLK3tNMWQ3OjKE1oMNa3FmRJpGu97hAEZexswz+/sbpq0=[b]</Modulus><Exponent>[/b]AQAB[b]<" + 
		                 "/Exponent></RSAKeyValue>[/b]";

The bold XML tags... what are they for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top