[Skip to main content](#vessel-content)

#   How to generate unique serials?

##

- **[cpreen](/forum/user/604-cpreen "View cpreen's Profile")**
- [![cpreen's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/604-cpreen "View cpreen's Profile") Topic Author
- [ Offline](/forum/user/604-cpreen)

Less More

- Posts: 98
- Thank you received: 3
-
-

14 years 1 month ago [\#67564](#67564) by [cpreen](/forum/user/604-cpreen "View cpreen's Profile")  *[How to generate unique serials?](/forum/17-serial-how-to/67564-how-to-generate-unique-serials#67564 "Hi,  So I bought HikaSerial and I'm now trying add the new facility into my workflow. What I want to do is this:  - issue a unique activation key with each licence purchased thru HikaShop  - in my own activation page verify the key and associate it with a seat number generated by my software from the characteristics of the PC on which the software is installed. i.e. I need to know which table contains the order - key data and if I can add a seat number field.  Regarding unique activation keys my question is - are the random keys unique? I don't want to use sequential keys because it's a bit obvious to a customer who orders 2 licences how to activate a 3rd one. An obfuscated sequential system would be better.  Conrad")* was created by *[cpreen](/forum/user/604-cpreen "View cpreen's Profile")*

Hi,

So I bought HikaSerial and I'm now trying add the new facility into my workflow. What I want to do is this:

- issue a unique activation key with each licence purchased thru HikaShop

- in my own activation page verify the key and associate it with a seat number generated by my software from the characteristics of the PC on which the software is installed. i.e. I need to know which table contains the order - key data and if I can add a seat number field.

Regarding unique activation keys my question is - are the random keys unique? I don't want to use sequential keys because it's a bit obvious to a customer who orders 2 licences how to activate a 3rd one. An obfuscated sequential system would be better.

Conrad

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vNjc1NjQtaG93LXRvLWdlbmVyYXRlLXVuaXF1ZS1zZXJpYWxzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

14 years 1 month ago [\#67568](#67568) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Re: How to generate unique serials?](/forum/17-serial-how-to/67564-how-to-generate-unique-serials#67568 "Hi,  So I bought HikaSerial and I'm now trying add the new facility into my workflow. What I want to do is this:  - issue a unique activation key with each licence purchased thru HikaShop  - in my own activation page verify the key and associate it with a seat number generated by my software from the characteristics of the PC on which the software is installed. i.e. I need to know which table contains the order - key data and if I can add a seat number field.  Regarding unique activation keys my question is - are the random keys unique? I don't want to use sequential keys because it's a bit obvious to a customer who orders 2 licences how to activate a 3rd one. An obfuscated sequential system would be better.  Conrad")*

Hi,

The random generator does not check if the keys are real unique.
You can made a copy of the random generator in order to create a new random-unique generator.

The idea is to generate more serials than necessary and make a request in the database in order to check if all generated serials are not yet generated.
If there are some existing serials, just remove them from the list and use the N first non-existing serials.

Serials are stored in the table #__hikaserial_serial
The column serial_order_id is the order_id from #__hikashop_order.
The column serial_data contains your key.
The column serial_extradata contains extra data information (which have been serialized).

Regards,
Jerome

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vNjc1NjQtaG93LXRvLWdlbmVyYXRlLXVuaXF1ZS1zZXJpYWxzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.043 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
