If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
random keygen
3 posts
• Page 1 of 1
random keygen
after some research i found this code:
to generate random keys like are used for serial or product keys...
i simply run a loop and save it in an array, like this my computer is able to generate up to 30 000 keys (ruby module turns off with 50 000...
it would be useful to provide a list of pruduct keys for purchasing custumors of your software product(to get updates with the key) or maybe also for a simple protection system...
my question now is, are the generated numbers unique in this code?
how to bulid a guid / uuid keygen? found some codes about "SecureRandom" can this be used in FS?
some link about: http://stackoverflow.com/questions/1117 ... ds-in-ruby
- Code: Select all
(0..@lenght).to_a.map{|a| rand(16).to_s(16)}.join
to generate random keys like are used for serial or product keys...
i simply run a loop and save it in an array, like this my computer is able to generate up to 30 000 keys (ruby module turns off with 50 000...
it would be useful to provide a list of pruduct keys for purchasing custumors of your software product(to get updates with the key) or maybe also for a simple protection system...
my question now is, are the generated numbers unique in this code?
how to bulid a guid / uuid keygen? found some codes about "SecureRandom" can this be used in FS?
some link about: http://stackoverflow.com/questions/1117 ... ds-in-ruby
- Attachments
-
- randomKeyGen.fsm
- (14.14 KiB) Downloaded 856 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: random keygen
if you do not have to use it to the plugins (because now they can no longer recall, external extensions)
it can be created using Win32API.
only with the ruby is not effectively secure and unique.
it can be created using Win32API.
only with the ruby is not effectively secure and unique.
- Code: Select all
require 'Win32API'
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa379205(v=vs.85).aspx
@api = Win32API.new('rpcrt4', 'UuidCreate', 'P', 'L')
buffer = ' ' * 16
@api.call(buffer)
a, b, c, d, e, f, g, h = buffer.unpack('SSSSSSSS')
uuid = a, b, c, d, e, f, g, h # => [33474, 814, 35932, 17755, 31113, 32122, 12955, 9560]
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: random keygen
thanks tronic, but looks like this one has just 5 digits and only numbers so i think its not very secure with 100 000 possibilities, i really dont get how this is working how should a 5 digit number be universal unique? here i also tried another library but with the same effect, or is every letter in your example one part of the uuid?
if so how can i get it in a format with letters too like these classic serials like jK39-o7U2-287b-kjh5 with 0..9, A..Z, a..z included
like the example in my first post but i don`t know if keys are repeating with this code?
i mean when i use
- Code: Select all
require 'Win32API'
@api = Win32API.new('ole32', 'CoCreateGuid', 'P', 'S')
buffer = ' ' * 16
@api.call(buffer)
uuid = buffer.unpack('SSSSSSSS')
if so how can i get it in a format with letters too like these classic serials like jK39-o7U2-287b-kjh5 with 0..9, A..Z, a..z included
like the example in my first post but i don`t know if keys are repeating with this code?
i mean when i use
- Code: Select all
output p.uniq
- Code: Select all
output p
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 108 guests