C# Product Key Methods for License/Activation needed
$30-250 USD
Berlangsung
Dibuat sekitar 12 tahun yang lalu
$30-250 USD
Dibayar ketika dikirim
I'd like a C# class to manage ProductKeys for License/Activation features.
I only want the ProductKey Generation, ProductKey disassembly, ValidityCheck, Surety File Load, and Surety File Save functions.
I'd like a class to store all the properties of the ProductKey (Get Set) and a Class with the methods to manage it.
I'd like the ProductKey values converted to a string or character array, encrypted, and hashed into a string similar to '234HJ-P45KK-8E8V5-DOD31-U53GG'
I'm no License/Activation expert, but I think I want a header/footer to assist with making sure its a valid key of mine, but I'm open to any other techniques. I also think it probably needs to be encrypted, before hashed, but I might be wrong about that for keeping the ProductKey length short. I would like the key to be similar length to a Microsoft type product key, maybe 40 characters max.
I'd like methods to Load/Save an encrypted Surety file, which will contain the ProductKey, MachineFingerPrint, and ActivationDate.
I'd like methods to Create a ProductKey from properties and Disassemble the ProductKey into the properties
I've outlined the Properties, and methods I think I need below, but I'm open to changes, enhancements, recommendations.
I would like it to be tested with a range of values, to make sure its working properly.
class KeyValuesClass
{
Header byte
ProductCode tinyint
Edition tinyint (4 values - Standard, Professional, Enterprise, Ultimate)
Version tinyint
Trial bool (bit)
Feature1 bool (bit)
Feature2 bool (bit)
Feature3 bool (bit)
Feature4 bool (bit)
Feature5 bool (bit)
Feature6 bool (bit)
Feature7 bool (bit)
SerialNumber uint (2 bytes)
Expiration date
Footer byte
}
class KeyManager
private string EncryptionKey = "myEncryptionKey";
public bool GenerateKey(KeyValuesClass KeyValues, ref string ProductKey)
{
using encryption on the key data would be great if possible
assemble all the bytes/bits of the KeyValues Class into a string? Encrypt it? Hash it into a product key?
returns product key in format '234HJ-P45KK-8E8V5-DOD31-U53GG'
return true for success, false for failure
}
public bool DisassembleKey(string ProductKey, ref KeyValuesClass KeyValues)
{
unencrypt, validate, disassemble into the structure/class
return true if successful, false if failure.
}
public bool ValidKey(ProductKey)
{
returns true for a valid key, false for invalid.
Check CRC or Header/Footer for validity
}
public int loadSuretyFile(string filename, ref string ProductKey, ref string FingerPrint, ref Date lastCheckedDate)
{
// return 1 for success
// return -1 for file not found
// return -2 for decryption failed
// return -3 for invalid contents
// Open the file, decrypt the contents, return the ProductKey, FingerPrint and lastCheckedDate
}
public bool SaveSuretyFile(string filename, string ProductKey, string FingerPrint, Date lastCheckedDate)
{
// Create a file with the ProductKey, FingerPrint, Header/Footer or CRC or Similar, and lastCheckedDate
// encrypt the file contents.
}
Sample usage:
string myProductKey = "";
keyValues myKey = new keyValues;
bool result = false;
[login to view URL] = 77;
[login to view URL] = 93;
[login to view URL] = 11;
[login to view URL] = [login to view URL];
[login to view URL] = 1;
[login to view URL] = true;
[login to view URL] = false;
[login to view URL] = true;
[login to view URL] = true;
etc
[login to view URL] = 12293;
[login to view URL] = "12/31/2014";
Result = GenerateKey(myKey, ref myProductKey ) ;
if (ValidKey(myProductKey))
{
keyValues myKeyNew = new keyValues;
result = DisassembleKey(myProductKey, ref myKeyNew);
[login to view URL]([login to view URL]);
[login to view URL]([login to view URL]);
etc,
etc,
[login to view URL]([login to view URL]);
OR
if ([login to view URL] != [login to view URL]) [login to view URL]("ProductCode Check FAILED")
if ([login to view URL] != [login to view URL]) [login to view URL]("Version Check FAILED")
etc,
etc,
}
I recently wrote a protection system for my own applications. It currently doesn't implement a feature-oriented approach but that probably won't be difficult to add.
We can work in your C# Product Key Methods for License/Activation . I am a leader of the team. I have 14 Years of experience in Software development Windows and Web. Expert in Sql Server and .NET. Microsoft Certified as MCP, MCTS, MCPD, MCT. Please contact me to clarify all details.