This project has moved and is read-only. For the latest updates, please go here.

Increase number of features to more than 8 boolean values

Topics: Development, Help & Support
Jan 18, 2015 at 1:02 AM
I'm needing more options for features than just the 8 currently provided. Do you have any ideas for working around this?
Jan 18, 2015 at 6:44 PM
Edited Jan 18, 2015 at 6:45 PM
There are two solutions to this: one that does not require any change in the API and another that does require some things to be changed:
  • No change in API: instead of using the "features" functionality as it is, you can interpret features as a binary number. That is, say we have the features f1,f2,f3,f4,f5,f6,f7,f8. Feature1 is achieved by setting f8 to true. Feature2, by setting f7 to true, while f8 is false. Feature3 is both f7 and f8 set to true. Basically, you interpret the feature not as individual booleans, but rather as a combination of them.
  • With a change in the API: If the above solution isn't enough, you can actually add one more feature without changing the length of the key. I think you should be able to just add another boolean value, fix the boolean-int and int-boolean converter and it's done.
Please let me know if you have any other questions!
Mar 20, 2015 at 4:32 AM
Edited Mar 26, 2015 at 9:14 AM

In real world, the feature set may be changed for each key generated. I wonder if it is possible to update a generated key. For example today I generate a key with 3 first features, then tomorrow I want to update that key with some more features. How should I do?

Because we delivered the key to client and shouldn't ask them to change key when we want to update

Mar 21, 2015 at 9:18 AM

You could always use a database that keeps track of all information (such as features). In that case, the key can be anything, as long as it is stored in the database and has features, creation date, etc associated with it.

If you would like to get a working implementation of this, I would suggest using another application I am currently working on called Serial Key Manager ( NB: At this point, by changing creation date, features, etc, the key will still change, since all keys work offline using SKGL API. However, it's not that big of a deal to fix this. A time frame for this change is probably 1-2 weeks (to be on the safe side), but it might take longer or less time (this system requires a lot of testing in order to make sure that everything works as desired).

Once I am done implementing this, I will let you know!


P.S. If you would have any other questions, please feel free to ask me!