I think to create a USP-protection by Yourself, won't work, because the User can duplicate the USB.
Some Years ago, I used a DONGLE-protection from the Company =>
ALADIN connected to LPT
( You can search in Internet )
They are also offering special USB's as Software-protection.
Inside Your Application, You include a decrypt function. The connected Dongle / USB returns the encrypted Value.
Hardwareprotection I don't use anymore, because of many problems like a User notifies a lost Dongle or USB.
Not possible for You, to control this.
A licence-Key might be a better Solution.
My Function for Dongle-protection I used.
With a delivered Dongle-burner ( Hardware ), I burned the Dongle with a Number.
I had to include a extra Lib with special Functions, to read from Dongle.
At start I called a Testfunction :
FUNCTION TEST_LIC()
ModAd := 12227PORT := HL_PORT(ModAd)
CINT_OFF()
Checks the Number from Dongle
CHL_ON(Port, ModAd)The decrypted Test-string
string1 := chr(166)+chr(107)+chr(97)+chr(248)+chr(208)+chr(123)+chr(88)
string2 := chr(89)+chr(212)+chr(9)+chr(232)+chr(173)+chr(196)+chr(76)
The Function returns the encrypted strings used the Return-value from Dongle
CK_EYE(Port, @string1, 7)
CK_EYE(Port, @string2, 7)
string1 := val(string1)
string2 := val(string2)
if string1 + string2 <> 119
wrong Value
CHL_OFF(port)
CINT_ON()
quit
else
Encryption OK
CHL_OFF(port)
CINT_ON()
endif
RETURN (NIL)
Best Regards
Uwe