Tips and Tricks
Sentinel Hardware Keys Developer’s Guide
157
Note:
Use floating values for comparison. Instead of using only the SP_SUCCESS
decimal value for comparing the API return codes, you may add floating
point values (like 1.5) to it. This provides more security against reverse
engineering of the assembly code.
If the correct key is attached, the variable will contain the proper value. In
actual practice, this technique is most effective if the mathematics behind
the correct value is more complicated than simple addition.
Checksum Your Code
You should adopt the practice of making a checksum of your critical data.
You should also verify the validity of the application and any DLLs or shared
libraries that it uses. This helps detect if the code or data has been modified
and identify when your application has been tampered with.
Dealing With Missing Sentinel Keys
If no Sentinel Key is attached to the computer or in network when a pro-
tected application is run, an error is returned by the SFNTGetLicense API
function. If a connection is established, but the key is later removed, subse-
quent API functions will return errors. Refer to the Business Layer API Help
for exact status codes.
If your application detects that the Sentinel Key is not present, it is up to you
to decide what action you want to take. Typically, you should not shut down
your application because of a single unexpected response.
Instead, repeat your query; if the response is still wrong, then you can take
action. Possible actions include:
■
Display a message and wait for the user to respond. This method does
not prevent users from running the application, but it makes doing so
extremely annoying, especially if the application queries the
hardware key frequently.
■
Shut down the application after a predetermined number of failed
queries. (However, only under the most extraordinary circumstances
Содержание Sentinel
Страница 1: ...1 2 0...
Страница 6: ...vi Sentinel Hardware Keys Developer s Guide...
Страница 12: ...Contents xii Sentinel Hardware Keys Developer s Guide...
Страница 20: ......
Страница 58: ...Chapter 2 Sentinel Keys SDK Components 40 Sentinel Hardware Keys Developer s Guide...
Страница 80: ...Chapter 3 Planning Application Protection and Licensing Strategy 62 Sentinel Hardware Keys Developer s Guide...
Страница 82: ......
Страница 108: ...Chapter 4 Protecting Applications Using Shell 90 Sentinel Hardware Keys Developer s Guide...
Страница 180: ......
Страница 196: ...Chapter 8 License Grouping 178 Sentinel Hardware Keys Developer s Guide...
Страница 212: ...Chapter 9 Programming Sentinel Hardware Keys 194 Sentinel Hardware Keys Developer s Guide...
Страница 214: ......
Страница 236: ...Chapter 10 Redistributables for Customers and Distributors 218 Sentinel Hardware Keys Developer s Guide...
Страница 252: ...Appendix A Troubleshooting 234 Sentinel Hardware Keys Developer s Guide...
Страница 282: ...Index 264 Sentinel Hardware Keys Developer s Guide...