Giter VIP home page Giter VIP logo

dotnet-licence-key-generator's People

Contributors

gbro3n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnet-licence-key-generator's Issues

License?

Trying to clarify the license of this library.

As there is currently no license attributed, and language in the readme talking about a 30 day trial I am assuming this is available via a commercial license?

If it is intended to be used free of charge, please apply a license that allows this, else it cannot legally be used by others in their projects. See https://help.github.com/articles/open-source-licensing/

Thanks!

how to use variable data for bytekey

I am trying to incorporate a hardware serial number into the key so it has to match when validating the product code. I have changed one of the keybytes to be the serial number and use the product code generated. When I put in the product code and use the same keybytes, I find that multiple serial numbers will be validated.

Any suggestions on how to accomplish using a serial number at time of checking the product code?

blacklisting seeds

So far i love the generator but im running into an issue adding seeds to the blacklisted seeds array. I added them to a List and convert to an array in the blackListedSeeds call. Key is still showing valid. Any suggestions?

I am having problems converting the code to VB.NET

I have used SharpDevelop to convert the code to VB,NET and I understand that I can use the same dll's that are bundled. Still, I am having issues regarding these lines, after conversion:

[error] Type expected. (BC30182) @ Sample1.Server.ConvertedToVBNet\LicenceServer.vb:19,22 >>
Dim keyGenerator = New PkvLicenceKeyGenerator()

[error] 'keyBytes' is not declared. It may be inaccessible due to its protection level @ \Sample1.Server.ConvertedToVBNet\LicenceServer.vb:22,52 >>
Dim key As String = keyGenerator.MakeKey(userId, keyBytes)

Any help would be highly appreciated.

Random() in test

Just a small issue I noticed on your .Tests project.

You are creating new instances of Random inside loop. That will not generate random number each loop. You can see that yourself by outputting your seed to console. Right now it would generate 100-200 unique seeds instead of 10000, what the loop tries to do.

To fix the issue, you have to instantiate Random outside of your loop and use the reference inside, that will guarantee new seed each time.

10.2 benefit - maybe is weeknes of your approach

not sure what think othe rbut I think is weak part of your solutions....
"Light weight and fast code execution, tested up to 1,000,000 key generation and verification cycles in 10.2 seconds."

User id is useless

The userId field in sample projects is useless, because when checking the license key, userId field is never used. So when i enter the license key to any program, it acceps. The user can copy my program to another computer and can run it with the same serial.

The code taken from your own sample projects and changed a little bit. i accepts the key

int userId = int.Parse(Console.ReadLine());

        // We will use the LicenceServer project in this sample to generate a key.
        // In production code, the licence server mechanism would be a separate application
        // from the application that verifies the key. This is important so as to protect the
        // full KeyByteSet array that was used to generate the key.

        var licenceServer = new LicenceServer();

        // Generate the licence key using the seed

        string licenceKeyStr = licenceServer.GenerateLicenceKey(userId);

        Console.WriteLine("\nLicence key generated: " + licenceKeyStr);
        Console.WriteLine("\nNow we will verify the licence key. Please type the licence key printed above: ");

        var result = PkvLicenceKeyResult.KeyInvalid;

        while (result != PkvLicenceKeyResult.KeyGood)
        {
            string userEnteredLicenceKeyStr = licenceServer.GenerateLicenceKey(1);
            Console.WriteLine(userEnteredLicenceKeyStr);
                //Console.ReadLine();

            var pkvKeyCheck = new PkvKeyCheck();

            // Here we recreate a subset of the full original KeyByteSet array that
            // was used to create the licence key. Note the argument to keyByteNo in 
            // each matches that in the full KeyByteSet array.

            var keyBytes = new[] {

                new KeyByteSet(5, 165, 15, 132), 
                new KeyByteSet(6, 128, 175, 213)
            };

            result = pkvKeyCheck.CheckKey(userEnteredLicenceKeyStr, keyBytes, 8, null);

            if (result != PkvLicenceKeyResult.KeyGood)
            {
                Console.WriteLine("\nResult is: " + result.ToString() + ". Please try again.");
            }
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.