views:

53

answers:

3

Hello, I'm working on a project for a client in which the client owns the source code that I develop. I plan on purchasing and using a 3rd party .NET library in this project. When I purchase the library, I have the right to use it royalty free on as many sites as I like. However, the library uses a license key that must be set in a property before using the library.

What would be the best way to "hide" this license key from the client?

Thank you in advance for any suggestions!

A: 

Whatever you do here, the assemblies will always end up being decompilable, so there's always scope for the license key being rooted out. Given this, I don't think it's worth throwing a lot of effort at hiding the license key - perhaps a simple base-64 encode or XOR based 'encryption' (loose sense of the term) would suffice? Running an obfuscator over the assembly that contains the license key might help muddy the waters for a would-be scavenger.

Will A
Thanks, that makes the most sense. No need to waste time on something that can be easily undone.
Elbelcho
+1  A: 

It depends completely on the library and where the key should be set.

I suggest contacting the library vendors directly.

Kragen
A: 

Would storing the license as an embedded resourse help out here? If it's a case of you don't want to store it in the webconfig? will the client get to see your sourse code? That or encrypting or obfuscation as mentioned by Will A are the ways to go.

AidanO