Skip to content

Software License Dongle for Ruby

Like PHP, Ruby ships as source, so the dongle earns its place when you install on customer hardware rather than hosting yourself.

KeyNub::Dongle.open do |dongle|        # closed when the block ends
  raise 'no genuine KeyNub' unless dongle.genuine?

  dongle.session_open
  license = dongle.record_read('license')
endCode language: Ruby (ruby)

The block form closes the device when the block exits, including when it exits by raising. The binding uses FFI, so there is no native gem to compile.

And the rule that matters in every language: do not branch on a boolean. Encrypt data your program genuinely needs with appEncrypt at build time and decrypt it through the dongle at run time, so removing the check leaves the program with nothing to compute rather than a working unlicensed copy.

All supported languages · Buy a KeyNub · Ask us something

KeyNub

A project of AB-Tools GmbH.
Address: Marsstraße 78 · 80335 Munich · Germany
Phone: +49 89 38898588 · Fax: +49 89 38898589
E-mail: info@keynub.com

Managing Director: Andreas Breitschopp
Commercial register HRB 202859 · Amtsgericht München (Munich local court)
VAT ID DE268720895 · Munich tax office for corporations
Grenke Bank AG · IBAN: DE49201304000060270139 · BIC: GREBDEH1XXX

Developers · Payment Methods · Shipping · Terms & Conditions · Right of Withdrawal · Privacy Policy · Legal Notice