Elbelcho
Elbelcho

Reputation: 459

Hide a 3rd party tool license key from client

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!

Upvotes: 0

Views: 591

Answers (3)

AidanO
AidanO

Reputation: 878

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.

Upvotes: 0

Justin
Justin

Reputation: 86759

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

I suggest contacting the library vendors directly.

Upvotes: 1

Will A
Will A

Reputation: 24998

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.

Upvotes: 1

Related Questions