You are on page 1of 56

Software Rights Management

Software Protection and Licensing Tutorial Starter Kit

www.safenet-inc.com

Copyrights and Trademarks


The Sentinel HASP system and its accompanying documentation are copyrighted works of SafeNet, Inc. and/or Aladdin Knowledge Systems, Ltd. ( 2009 SafeNet, Inc., and/or Aladdin Knowledge Systems Ltd. All rights reserved.). HASP, Sentinel HASP, HASP SRM, Sentinel HASP Business Studio, HASP HL Basic, HASP HL Pro, HASP HL Max, HASP HL Time, HASP HL Net, HASP HL NetTime, HASP HL Drive, Hardlock, LicenseOnChip, Cross-Locking, and Method-level protection are registered and/or unregistered trademarks of SafeNet, Inc., or Aladdin Knowledge Systems, Ltd., in the United States and other countries. All other trademarks referenced herein, and in the Sentinel HASP system, and its accompanying documentation, are registered and/or unregistered trademarks of their respective owners.

Patents
HASP hardware and/or software products described in this document are protected by one or more of the following Patents, and may be protected by other United States and/or foreign patents, or pending patent applications: US 5,359,495, US 5,898,777, US 6,189,097, US 6,073,256, US 6,272,636, US 6,009,525, US 6,044,469, US 6,055,503, US 6,334,213, US 6,434,532, US 6,285,985, US 6,334,214, US 6,009,401, US 6,243,692, US 6,363,356, US 7,149,928, US 7,065,652, US 6,915,425, US 6,898,555, US 7,065,650, US 7,225,336, US 7,191,325, EP 1220075, EP 1318451, EP 1271310, EP 1353259, EP 1387235 and EP 1439446.

Disclaimer
We have attempted to make this document complete, accurate, and useful, but we cannot guarantee it to be perfect. When we discover errors or omissions, or they are brought to our attention, we endeavor to correct them in succeeding releases of the product. SafeNet, Inc., Aladdin Knowledge Systems, Ltd., and the subsidiaries and affiliates of each, are not responsible for any direct or indirect damages or loss of business resulting from inaccuracies or omissions contained herein. The specifications contained in this document are subject to change without notice. Kindly be advised that the analyses provided herein are based on findings reached pursuant to research and investigation conducted by SafeNet, Inc., and/or Aladdin Knowledge Systems, Ltd., whilst using their own reasonable methods of investigation, and are provided to you on an "As-Is" basis, without any guarantee or warranty whatsoever. Neither SafeNet, Inc., nor Aladdin Knowledge Systems, Ltd., makes any representation as to the confirmation or endorsement of the analyses contained herein by any third party. January 2010 Version 5.0 Revision 1109-1

Contents
Introduction ........................................................................................... 5
Sentinel HASP Keys.................................................................................................. 6 Roles.......................................................................................................................... 6 Conventions............................................................................................................... 7 Lessons in This Tutorial............................................................................................. 7

1. Preliminary Preparation ........................................................................... 9


Installing the Sentinel HASP Software.................................................................... 10 Launching Sentinel HASP Vendor Suite................................................................. 10 Introducing the Sentinel HASP Vendor Keys...........................................................11 Customizing the Online-Activation Demo ............................................................... 12

2. Defining Features....................................................................................13
Defining a Feature for the Sample Bouncing Ball Program.................................... 15 Defining a Feature for the MyNotepad Program..................................................... 15

3. Protect Once ............................................................................................17


Protecting the Sample Bouncing Ball Program....................................................... 18 Protecting the MyNotepad Program........................................................................ 21

4. Defining Products ...................................................................................23


Defining a Product With an Execution-based License............................................ 24 Defining Products With Fully-Featured Licenses.................................................... 25

5. Defining a Provisional Product.............................................................29


Defining a Provisional Product ................................................................................ 30 Defining a Bundle of Provisional Products.............................................................. 31 Creating a Sentinel HASP Run-time Environment Installer.................................... 32

Contents

6. Creating and Distributing a HASP SL-protected Software Order....35


Defining a Perpetual License With a Product Key ..................................................36 Installing a Trial Product...........................................................................................37 Activating a License With a Product Key.................................................................38

7. Creating and Distributing a HASP HL-protected Software Order....41


Defining a Rental Product Order With HASP HL Locking ....................................42 Using an Application With a HASP HL Key.............................................................43 Creating an Update for a License in the Field.........................................................45 Updating a License at the Customers Site .............................................................47

8. Using Sentinel HASP Run-time API......................................................49


Selecting Your Programming Language..................................................................51 Login.........................................................................................................................51 Encrypting Data and Writing to Memory..................................................................52 Retrieving Sentinel HASP Key Information .............................................................53 Reading and Programming Sentinel HASP Key Memory.......................................54 Whats Next?............................................................................................................55

Introduction
ThankyouforchoosingSentinel HASPasthemethodtoprotectand licenseyoursoftwareagainstunauthorizeduse.InthisTutorial,you usetheSentinel HASPsystemtoprotect,license,anddistribute software. Thestrength,uniqueness,andflexibilityofSentinel HASPisbasedon twoprimaryprinciples: ProtectOnceDeliverMany,whichistheconceptofseparatingthe softwareengineeringandbusinessprocesses CrossLocking,whichisthetechnologythatsupportsthe Protect OnceDeliverManyconcept,enablingaprotected applicationtoworkwithaHASP HL(hardware)oraHASP SL (software)key Allcommercialdecisions,packagecreation,andlicensedefinitionsare executedbyproductormarketingmanagersaftertheprotectionhas beenimplemented. Thisworkflowmodelprovidesyouwithgreaterflexibilityand freedomwhendefiningnewsalesandlicensingmodels,including featurebasedandcomponentlicensing,evaluation,rental,floating, subscription,provisional(trial/grace),payperuse,andmore, enablingyoutofocusonrevenuegrowth.

Introduction

Sentinel HASP Keys


YourSentinel HASPStarterKitincludesanumberofSentinel HASP keysthatyouwilluseinthefollowinglessons: Sentinel HASPVendorkeys: Sentinel HASPDeveloperkey(yellow),usedtoprotectyour programs Sentinel HASPMasterkey(blue),usedforlicenseproduction. TheSentinel HASPMasterkeymuststayconnectedtothe Sentinel HASPBusiness StudioServermachine. OneormoreenduserHASP HLkeys,usedtoruntheprotected program(colordependsonkeytype)

Note:
ThistutorialisgenerallynotapplicableforHASP HL Basickeys. HASP HL Basickeyscanbeusedonlytoprotectyourprograms.

Roles
TheSentinel HASPsystemisrolebased,andthetasksyoucan performdependontheuserrolesassignedtoyoubythe Sentinel HASPAdministrator. Inordertoenableyoutoexperiencethebroadfunctionalityofthe Sentinel HASPsysteminthistutorial,youwillhaveaccesstoallroles. Therolesyouassumeinthevariouslessonsinclude: Product Managementrole Theperson,usuallyaproductmanager,whodeterminesthe productcomponentstobeprotected(calledFeaturesin Sentinel HASP),howthesecomponentsareusedtodefine Products,andthelicensestructurefortheProducts Developmentrole Theperson,usuallyasoftwareengineer,whoprotectsthe softwareusingSentinel HASPEnvelopeortheSentinel HASP RuntimeAPI,andperformsotherdevelopmentrelatedtasks, suchasgeneratingtheSentinel HASPRuntimeInstaller Customer Services role ThepersonresponsibleforperformingmanualProductactivations

Conventions
Order Managementrole

Thepersonresponsiblefordefiningandmanagingcustomerorders Production role Thepersonresponsibleforproducingcustomerorders Inaddition,youwillassumetheroleofanenduserinordertotest, use,andupdatetheproductslicensedusingSentinel HASP.

Conventions
Eachofthelessonsinthistutorialbeginswithafocusedbreakdownof thelesson,suchasthefollowing: Objective Role in this lesson Applications used
A short description of the lesson objective The role or roles that you assume during the lesson Sentinel HASP applications you use in the lesson

Lessons in This Tutorial


ThistutorialisbasedonaWin32operatingsystemandincludesthe followinglessons: Lesson 1Preliminary Preparation Inthislesson,youinstalltheSentinel HASPsystemandlearnhow tolaunchSentinel HASPVendorSuite.Youthenintroduceyour Sentinel HASPMasterkeyandSentinel HASPDeveloperkeyinto theSentinel HASPsystem.Inaddition,youcustomizethe OnlineActivationDemothatyouwilluselaterinthistutorial. Lesson 2Defining Features Inthislesson,youuseSentinel HASPBusinessStudiotodefine twoprogramsasFeatures,whichyouwilllaterlicenseand protect. Lesson 3Protect Once Inthislesson,youuseSentinel HASPEnvelopetoapply protectiontoyoursoftware.

Introduction Lesson 4Defining Products Inthislesson,youuseSentinel HASPBusinessStudiotodefine yourofferingbydefiningProductsbasedontheFeaturesyou alreadydefinedandprotected. Lesson 5Defining a Provisional Product Inthislesson,youuseSentinel HASPBusinessStudiotodefinea ProvisionalProductbasedononeoftheProductsyoudefined, enablingyoutodistributeatrialversionofyoursoftwarelater. Lesson 6Creating and Distributing a HASP SL-protected Software Order Inthislesson,youlockyourprotectedsoftwaretoaHASP SLkey forlaterdistribution.Youwillcreateanorder,defineacustomer, codetheHASP SLkey,andusethesoftwareasanenduser.You willalsolearnhowtoactivatealicense,inordertoconvertthe trialversionofaprogramtoafullyfeaturedprogram. Lesson 7Creating and Distributing a HASP HL-protected Software Order Inthislesson,youlockyourprotectedsoftwaretoaHASP HLkey forlaterdistribution.Youwillcreateanorder,defineacustomer, codetheHASP HLkey,andusethesoftwareasanenduser.You willalsolearnhowtocreatealicenseupdateforadeployed ProductthathasitslicenselockedtoaHASP HLkey. Lesson 8Using Sentinel HASP Run-time API Inthislesson,youlearnhowtoprogramthememoryon Sentinel HASPprotectionkeys. Werecommendthatyoufollowthelessonssequentiallytofamiliarize yourselfwiththeSentinel HASPsystemandtogainaclear understandingofthestrengthoftheProtectOnceDeliverMany model,andtheflexibilityitprovides.

Lesson 1

Preliminary Preparation
Objective Applications used
Prepare your computer and Sentinel HASP for the tutorial Installation DVD Sentinel HASP Vendor Suite

Theproceduresinthislessonarerequiredinorderforyoutobeable toimplementtheprocessesoutlinedinsubsequentlessonsofthis tutorial.They include: InstructionsforinstallingtheSentinel HASPsoftware,including Sentinel HASPBusinessStudioServer InstructionsforlaunchingSentinel HASPVendorSuite InstructionsforintroducingtheSentinel HASPVendorkeystothe Sentinel HASPsystem InstructionsforcustomizingtheOnlineActivationDemo

10

Preliminary Preparation

Installing the Sentinel HASP Software


Beforeproceedingwiththistutorial,installtheSentinel HASP softwareandtheSentinel HASPBusinessStudioServeronyour computer. RefertotheSentinel HASPInstallationGuideforalistoftheoperating systemsthataresupported.

WARNING!
DonotconnectanyofyourSentinel HASPkeysbeforeinstallingthe Sentinel HASPsoftware! To install the Sentinel HASP software: 1. 2. 3. InserttheSentinel HASPDVDintoyourmachine. SelecttheStart the Sentinel HASP Setupmenuoption. FollowtheSentinel HASP Setupwizardinstructions.

Note:
Formoredetailedinstallationinstructions,refertotheSentinel HASP InstallationGuide.

Launching Sentinel HASP Vendor Suite


Aftercompletingtheinstallation,launchSentinel HASPVendorSuite asfollows: FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite. TheSentinel HASPVendorSuiteprogramselectionwindowis displayed.YoucanaccesstheprimaryVendor Suiteapplications fromthiswindow.

Introducing the Sentinel HASP Vendor Keys

11

Introducing the Sentinel HASP Vendor Keys


Sentinel HASPVendorkeys(Sentinel HASPMasterkeyand Sentinel HASPDeveloperkey)enableyoutoapplySentinel HASP protectiontoyoursoftwareanddatafiles,toprogramthe Sentinel HASPprotectionkeysthatyousendtoyourendusers,andto specifythelicensetermsunderwhichyoursoftwarecanbeused. TheSentinel HASPDeveloperkeyisusedbyyoursoftwareengineers inconjunctionwiththeSentinel HASPprotectionapplicationsto protectyoursoftwareanddatafiles.TheSentinel HASPMasterkeyis connectedtotheSentinel HASPBusinessStudioServerandusedin conjunctionwithSentinel HASPBusinessStudiofordefiningFeatures andProducts,applyinglicenseterms,andproducingorders. Inordertocompletethistutorial,youneedtointroduceyour Sentinel HASPVendorkeystotheSentinel HASPsystem. To introduce your Sentinel HASP Vendor keys: 1. AftercompletinginstallationoftheSentinel HASPsoftware, connectyourSentinel HASPDeveloperkeyandyour Sentinel HASPMasterkeytoaUSBport.(Ensurethe Sentinel HASPMasterkeyisconnectedtotheSentinel HASP Business StudioServermachine). Navigatetothefollowingfolder: \Program Files\Aladdin\HASP SRM\VendorTools\VendorSuite. Doubleclickmasterhasp.exe.TheLogOntoSentinelHASP windowisdisplayed. IntheUser NameandPasswordfields,typeHASP. ClickOK.TheMasterHASPWizardlaunchesanddetectsyour Sentinel HASPVendorkeys. YourVendorCodefileisdisplayedintheFile Namefield,as [Batch Code].hvc.Makeanoteofthefilepathforuseinthenext procedure. Withoutchanginganyoftheparametersinthewizard,clickthe NextbuttoninallthedisplayedwizardwindowsuntiltheVendor LibraryUpdatedialogboxisdisplayed. ClickInstall.TheVendorLibraryisinstalledandasuccessmessage isdisplayed. ClickOKtoclosethesuccessmessage.

2. 3. 4. 5. 6.

7.

8. 9.

12

Preliminary Preparation 10. ClickFinishtoclosethewizard.Thisprocessintroducesthedatain yourkeytotheSentinel HASPsystemandextractsyour companysuniqueconfidentialVendorCode. ForadditionalinformationonVendorCodes,seeUnderstanding Sentinel HASPSoftwareProtectionandLicensinginthe Sentinel HASPSoftwareProtectionandLicensingGuide.

Customizing the Online-Activation Demo


Inthistutorial,youwillusetheOnlineActivationDemotosimulate Productactivation.Beforeyoucanusethisdemo,youmustcustomize thedemofile,activationdemo.ini,withVendorspecificdata.

Note:
Inareallifeenvironment,youusetheSentinel HASPActivationAPI todefineProductactivationforyourprogram.Foradditional information,refertotheSentinel HASPActivationAPIHelp,located inthefollowingfolder:\Program Files\Aladdin\HASP SRM\API\Activation. To customize the Online-Activation Demo file: 1. 2. 3.
\Program Files\Aladdin\HASP SRM\VendorTools\VendorSuite.

Navigatetothefollowingfolder:

..\..\Vendor Codes\demoma.hvc

Opentheactivationdemo.ini fileinatexteditor. IntheVendor Code pathsection,replacethestring

withtheVendorCodefilepaththatyoumadeanoteofinthe previousprocedurewhenintroducingyourSentinel HASP Vendorkeys. 4. IftheSentinel HASPBusiness StudioServerdoesnotusethe defaulthostandport,intheBusiness Studio Serversection,replace thedefaultvalueswithyourhostandport. 5. Savetheactivationdemo.inifile. Youarenowreadytostartthetutorial.

Lesson 2

Defining Features
Objective Role in this lesson Applications used
Learn how to define Features Product Management Sentinel HASP Business Studio

Note:
ThislessonisnotapplicableforHASP HL Basickeys. AFeatureisanidentifiablefunctionalityofasoftwareapplicationthat canbeindependentlyprotectedorlicensed.InSentinel HASP,a Featuremaybeanentireapplication,amodule,oraspecific functionalitysuchasPrint,Save,orDraw. FeaturesaretypicallydefinedbytheProductManagerbasedon businessdecisions,andarethenimplementedbythecompanys softwareengineers. Inthislesson,youassumetheProductManagementroleanduse Sentinel HASPBusinessStudiotodefinetwoFeaturesforusein subsequentlessons. To launch Sentinel HASP Business Studio: 1. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite. TheSentinel HASPVendorSuiteprogramselectionwindowis displayed. ClickBusiness Studio.The Log OntoBusinessStudiowindowis displayed. IntheUser NameandPasswordfields,typeHASP.

2. 3.

14

Defining Features 4. ClickOK.TheSentinel HASPBusinessStudiowindowis displayed. TheBusinessStudiowindowtypicallyincludesthefollowing: Functionpane,inwhichyouselectthefunctiontoperform Mainpane,inwhichyouviewandselectitems Taskpane,inwhichyouperformactions

Function pane Main pane Task pane

Defining a Feature for the Sample Bouncing Ball Program

15

Defining a Feature for the Sample Bouncing Ball Program


Inthissection,youdefineaFeatureforanexistingprogram,the BouncingBallsampleprogramsuppliedwithSentinel HASP. To define the Bounce Feature: 1. IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Features.TheManageFeatures windowisdisplayedintheMainpane.TheTaskpaneontheright ofthewindowliststhetasksthatcanbeperformedinthis window. IntheManageFeatureswindow,intheBatch Codefield,selectyour BatchCodefromthedropdownlist.(YourBatchCodeisprinted onthesideofyourkeys.) IntheTaskpane,clickNew.TheNewFeaturewindowisdisplayed. IntheFeature Namefield,typeBounce. ClickAdvancedtoexpandthewindow. SelecttheSpecify Feature IDcheckboxandtype50inthe correspondingfield. ClickOK.TheNewFeaturewindowclosesandtheBounceFeature youdefinedisdisplayedintheManageFeatureswindow.

2.

3. 4. 5. 6. 7.

Defining a Feature for the MyNotepad Program


Inthissection,youdefineaFeaturefortheMyNotepadprogram. You willcreatetheMyNotepadprograminLesson 3ProtectOnce. To define the MyNotepad Feature: 1. IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Features.TheManageFeatures windowisdisplayedintheMainpane. IntheManageFeatureswindow,intheBatch Codefield,selectyour BatchCodefromthedropdownlist. IntheTaskpane,clickNew.TheNewFeaturewindowisdisplayed.

2. 3.

16

Defining Features 4. 5. IntheFeature Namefield,typeMyNotepad. SelecttheSpecify Feature IDcheckboxandtype10inthe correspondingfield.

Note:
1. IftheSpecify Feature IDfieldisnotvisible,clickAdvancedto expandthewindow. 2. IfamessageisdisplayedinformingyouthatthisFeature ID is notavailable,donotuseadifferentFeature IDnumber. Close theNewFeaturewindow,andintheManageFeatures window,identifyFeature 10andnoteitsname.Forthe remainderofthistutorial,continuetouseFeature ID 10,with thenameyounoted(insteadofMyNotepad). 6. 7. ClickOK.TheNewFeaturewindowclosesandtheMyNotepad FeatureyoudefinedisdisplayedintheManageFeatureswindow. CloseBusinessStudio.

Lesson 3

Protect Once
Objective Role in this lesson Applications used
Learn how to apply Sentinel HASPs automatic protection functionality Development Sentinel HASP Envelope

Inthislesson,youuseSentinel HASPEnvelopetodefineprotection parametersfortwoprograms,usingthetwoFeaturesyoudefinedin Lesson 2DefiningFeatures. Sentinel HASPEnvelopeisaninnovative,advancedsolutionfor protectingsoftwareagainstillegalorunauthorizeduse.Thesolution detersillegalaccessandexecutionofprotectedapplications. AdeployedSentinel HASPprotectedprogramrequiresaccesstoa Sentinel HASPprotectionkeyinordertorun.Theprotectedprogram queriestheSentinel HASPprotectionkeyforpredefinedinformation. IftheSentinel HASPprotectionkeyisnotpresent,ortheinformation returnedisincorrect,theprogramdoesnotexecute,orstops functioning.

18

Protect Once

Protecting the Sample Bouncing Ball Program


Inthissection,youlaunchSentinel HASPEnvelopeandidentifythe BatchCodewithwhichyouwillprotectthesoftware.Youthendefine anendusererrormessage.Finally,youprotecttheBouncingBall program. TheSentinel HASPEnvelopewindowincludesthefollowing: Projectpane,inwhichyouselectthefunctiontoperform Displaypane,inwhichyouselectitemsandperformactions. The nameofthepanechangestoreflectthefunctionyouselectedin theProjectpaneforexample,Programsinthefollowing illustration. Logpane,inwhichSentinel HASPEnvelopemessagesare displayed

Project pane

Display pane

Log pane

Protecting the Sample Bouncing Ball Program To prepare for protection: 1. 2. ConnecttheSentinel HASPDeveloperkey. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite.TheSentinel HASPVendorSuiteprogramselection windowisdisplayed. ClickEnvelopetolaunchSentinel HASPEnvelope.Thelogin windowisdisplayed. ClickWork Offline.TheSentinel HASPEnvelopemainwindowis displayed.

19

3. 4.

Sentinel HASP Batch Code

5.

Beforeprotecting,Sentinel HASPEnvelopemustidentifythe correctBatchCode.IntheSentinel HASPEnvelopeProjectpane, selectSentinel HASP Batch Code.

20

Protect Once 6. IntherightpaneoftheSentinel HASPBatchCodewindow,select theUse Vendor Code from file option. BrowsetothelocationoftheBatchCode.Bydefault,BatchCodes arestoredin:

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorCodes

Note:
YourBatchCodefileisnamedaccordingtotheBatchCode labeledonyourSentinel HASPkeys.Forexample,ifyourkeysare labeledwiththeBatchCodeABCDE,yourBatchCodefileiscalled ABCDE.hvc. 7. SelectyourBatchCodefileandclickOpen.Thepathandfileare displayedintheUse Batch Code from filefield.

To protect the Bouncing Ball program: 1. 2. IntheSentinel HASPEnvelopeProjectpane,selectPrograms. ClickAdd ProgramsinthetoprightoftheProgramspane. TheAddProgramswindowisdisplayed,showingthecontentsof theVendorSuite\samplesfolder. SelectWin32_Bounce.exeandclickOpen.Win32_Bounceisnowlisted intheProgramspane. IntheProjectpane,underPrograms,select Win32_Bounce.The DisplaypaneliststheProtectionDetails. IntheFeature IDfield,type50(theFeaturedefinedfortheBounce programinLesson 2DefiningFeatures).

3. 4. 5.

Note:
IfyouareusingaHASP HL Basickey,select0intheFeature IDfield. 6. 7. IntheProjectpane,underDefault Protection Settings,selectWin32.The DisplaypanenowdisplaysWin32 - Default Protection Settings. IntheWin32DefaultProtectionSettingspane,decreasethe numberofPeriodic background checksfromthedefaultvalueto 5 seconds.Thismeansthatduringruntime,theprotected programwillcheckevery5secondstoensurethattherequired HASP HLkeyisconnected.

Protecting the MyNotepad Program 8.

21

9.

IntheProjectpane,underPrograms,selectWin32_Bounce,theninthe Displaypane,clickProtect.Amessageinformsyouthatthe Sentinel HASPsystemisprotectingtheprogram. ClickClosewhenSentinel HASPEnvelopenotifiesyouthatthe protectionhascompeted.TheprotectedBouncingBallprogramis savedinthisfolder:


\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected

Protecting the MyNotepad Program


Inthissection,youcreateacopyoftheWindowsNotepadprogram, defineprotectionparametersforprotectingitusingtheMyNotepad Feature,andprotecttheprogram.

Note:
ThissectionisnotapplicableforHASP HL Basickeys. To protect the MyNotepad program: 1. 2. 3. 4. LocatetheWindowsNotepadutility(usuallyunder\Windows). CreateacopyoftheNotepadutilityandrenameitMyNotepad.exe. VerifythatyourSentinel HASPDeveloperkeyisconnectedto yourcomputer. Ifitisnotalreadyopen,launchSentinel HASPEnvelope,andin theloginwindow,clickWork Offline.TheSentinel HASPEnvelope mainwindowisdisplayed. IntheSentinel HASPEnvelopeProjectpane,selectPrograms. ClickAdd ProgramsinthetoprightoftheProgramspane. TheAddProgramswindowisdisplayed. NavigatetothefolderwhereMyNotepad.exeislocated.Select the fileandclickOpen.NotethatanewMyNotepadentryisdisplayedin theProjectpaneunderPrograms. IntheProjectpane,underPrograms,selectMyNotepad.TheDisplay paneliststheProtectionDetails. IntheFeature IDfield,type10(theFeaturedefinedforthe MyNotepadprograminc).

5. 6. 7.

8. 9.

22

Protect Once 10. IntheProjectpane,underDefault Protection Settings,selectWin32.The DisplaypanenowdisplaysWin32 - Default Protection Settings. 11. IntheWin32DefaultProtectionSettingspane,movethe Encryption level slidertothefarright.Increasingtheencryptionlevel raisesthelevelofsecurityoftheprotectedprogram.Notethatthe increasedsecuritymaycauseaslightdelayinprogramloadtime becausedecryptionoftheprogramfilemaytakelongerto process. 12. Inanticipationofapossibledelayinprogramloadtime,inthe Projectpane,underPrograms,selectMyNotepad.IntheGeneraltabof theProtectionDetailspane,selecttheShow waitbox on start-upcheck boxtospecifythatawaitmessageisdisplayedtousersduring theprogramloadtime. 13. ClickProtect.AmessageinformsyouthattheSentinel HASP systemisprotectingtheprogram. 14. ClickClosewhenSentinel HASPEnvelopenotifiesyouthatthe protectionhascompleted.TheprotectedMyNotepadprogramis savedinthisfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected

15. CloseSentinel HASPEnvelope.Youarepromptedtosavethe changestothecurrentproject. 16. ClickSave.TheSaveAsdialogboxisdisplayed. 17. IntheFile Name field,typeTutorialandclickSave.Thedialogbox closesandtheprojectissaved.

Lesson 4

Defining Products
Objective Role in this lesson Applications used
Learn how to define the Products you want to license Product Management Sentinel HASP Business Studio

Note:
ThislessonisnotapplicableforHASP HL Basickeys. AProductisalicensingentitythatrepresentsoneofthevendors marketablesoftwareproducts.TheProductiscodedintothememory ofaHASPkeyandcontainsoneormoreFeatures.Licensetermsare definedforeachFeatureinaProduct. LikeFeatures,ProductsaredefinedusingSentinel HASPBusiness Studio.Typically,thisfunctionisperformedbytheProductManager, andimplementedbythesoftwareengineer.Inareallifeenvironment, anumberofProductsmightbedefinedandheldinreadinessfor inclusionincustomerorders.However,youcandefinenew ProductsmixingandmatchingFeaturesatanytime. Inthislesson,youdefineanumberofProducts.TheProductswill includelicensetermsfortheBounceandMyNotepadFeaturesyou definedinLesson 2DefiningFeatures.TheProductsthatyoudefine nowwillbeincludedintheordersyoudefineinlaterlessons.

24

Defining Products Inthislesson,youdefinethefollowingProducts: Bounce_LiteArentalProduct,inwhichthelicenseexpires afterthreeexecutions Bounce_FullAfullyfeaturedProduct,inwhichthelicense enablesunrestrictedaccesstoalltheFeaturesintheprogram.This ProductwillbecreatedbyduplicatingtherentalProductand modifyingthelicenseterms. MyNotepad_FullAfullyfeaturedProductthatenables unrestrictedaccesstoalltheFeaturesintheprogram

Note:
InLesson 6CreatingandDistributingaHASP SLprotectedSoftware Order,andLesson 7CreatingandDistributingaHASP HLprotected SoftwareOrderyouwillassumetheroleofanend user,andwillinstall licensesandruntheseProducts.

Defining a Product With an Execution-based License


Inthislesson,youdefineaProductbasedontheBounceFeature (ID 50),withalicensethatenablestheprogramtobelaunchedthree times.Followingthethirdexecution,thelicensemustbeupdatedto enablefurtheruseoftheprogram. To define a Product: 1. 2. LaunchSentinel HASPBusinessStudio. IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Products.TheManageProducts windowisdisplayedintheMainpane. SelectyourBatchCodeintheBatch Codefield. IntheTaskpane,clickNew.TheNewProductwindowis displayed. IntheGeneralarea,intheBase Product field,typeBounce_Lite. IntheAttributesarea,intheLocking Typedropdownlist,selectHASP HL or HASP SL.This optionenablesthelockingtypetobe determinedatthetimewheneachorderisdefined.

3. 4. 5. 6.

Defining Products With Fully-Featured Licenses 7.

25

8.

9.

10. 11. 12. 13.

EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatwhenyoulockProductstoaHASP SLkeyinalater lesson,theFeaturesintheProductswillbeprotectedagainst cloning.(ThismeansthatiftheSentinel HASPRuntimedetects cloningattheendusersite,theProductwillbedisabled.) IntheFeatures & Memoryarea,intheAvailable Featureslist,select Feature50 (Bounce)andclicktherightarrow.The selectedFeature ismovedtotheFeatures In Productlist. IntheFeatures In Productlist,selectBounceandclickDefinetospecify thelicensetermsfortheFeature.TheDefineLicenseTerms windowisdisplayed. IntheLicense Typedropdownlist,selectExecutions. IntheNumber of Executionsfield,type3. ClickOK.TheDefineLicenseTermswindowclosesandthelicense termsaredisplayedintheFeatures in Productlist. ClickOK.ThenewBounce_LiteProductisdisplayedinthe ManageProductswindow.NotethatthestatusoftheBounce_Lite ProductisReady.

Defining Products With Fully-Featured Licenses


Inthissection,youduplicateexistingProductsinordertodefinetwo additionalProducts: AProductbasedontheBounceFeature(ID 50),withaperpetual licensethatwillallowtheend userunlimitedaccesstothe program.ThisProductwilllaterbeusedtoupdatethelimited, executionbasedBounce_LiteProducttoafullyfeaturedlicense. AProductbasedontheMyNotepadFeature(ID 10),witha perpetuallicensethatwillallowtheend userunlimitedaccessto theprogram.InLesson 5DefiningaProvisionalProduct,youwill defineanevaluationMyNotepadProduct.TheMyNotepad_Full Productyoudefineinthislessonwilllaterbeusedtoupdatethe evaluationlicensetoafullyfeaturedlicense.

26

Defining Products To define the Bounce_Full Product: IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Products.TheManageProducts windowisdisplayedintheMainpane. 2. VerifythatthecorrectBatchCodeisdisplayedintheBatch Code field. 3. IntheTaskpane,clickNew.TheNewProductwindowis displayed. 4. IntheGeneralarea,intheBase Product field,typeBounce_Full. 5. IntheAttributesarea,intheLocking Typedropdownlist,selectHASP HL or HASP SL.This optionenablesthelockingtypetobe determinedatthetimewheneachorderisdefined. 6. EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatifaProductthatislockedtoaHASP SLkey,the FeaturesintheProductswillbeprotectedagainstcloning.(This meansthatiftheSentinel HASPRuntimedetectscloningatthe endusersite,theProductwillbedisabled.) 7. IntheFeatures & Memoryarea,intheAvailable Featureslist,select Feature50 (Bounce)andclicktherightarrow.The selectedFeature ismovedtotheFeatures In Productlist. 8. IntheFeatures In Productlist,selectBounceandclickDefinetospecify thelicensetermsfortheFeature.TheDefineLicenseTerms windowisdisplayed. 9. IntheLicense Typefield,selectPerpetual. 10. ClickOK.TheDefineLicenseTermswindowclosesandthelicense termsaredisplayedintheFeaturesinProductlist. 11. ClickOK.TherearenowtwonewitemsintheManageProducts window:Bounce_LiteandBounce_Full.Notethatthestatusofthe Bounce_FullProductisReady. To define the MyNotepad_Full Product: 1. IntheFunctionpaneoftheBusinessStudiowindow,under LicensingPlan,selectManage Products.TheManageProducts windowisdisplayedintheMainpane. VerifythatthecorrectBatchCodeisdisplayedintheBatch Code field. IntheTaskpane,clickNew.TheNewProductwindowis displayed. 1.

2. 3.

Defining Products With Fully-Featured Licenses 4. 5.

27

6.

7.

8.

IntheGeneralarea,intheBase Product field,typeMyNotepad_Full. IntheAttributesarea,intheLocking Typedropdownlist,selectHASP HL or HASP SL.This optionenablesthelockingtypetobe determinedatthetimewheneachorderisdefined. EnsurethattheClone Protectioncheckboxisselected.Thisoption ensuresthatifaProductthatislockedtoaHASP SLkey,the FeaturesintheProductswillbeprotectedagainstcloning.(This meansthatiftheSentinel HASPRuntimedetectscloningatthe endusersite,theProductwillbedisabled.) IntheAvailable Featureslist,undertheID field,select 10(MyNotepad) andclicktherightarrow.TheMyNotepadFeatureismovedtothe Features In Productlist. Todefinememorydata,intheFeatures & Memoryarea,clicktheDefine Memory Datatab,thendothefollowing: a. ClickNew.TheNewMemorySegmentwindowisdisplayed. b. IntheOffsetfield,type0.Thefieldcontentautomatically changesto0x0. c. IntheLengthfield,type50. d. ClickOK.Thewindowclosesandtheareaatthebottomofthe Define Memory Datatabishighlighted. e. Atthefirstdotontherightofthehighlightedarea,type Hello World.

9.

ClickOK.TheProductPropertieswindowcloses.Therearenow threenewitemsintheManageProductswindow:Bounce_Lite, Bounce_Full,andMyNotepad_Full.Notethatthestatusofthe Bounce_FullProductisReady.

28

Defining Products

Lesson 5

Defining a Provisional Product


Objective Role in this lesson Applications used
Learn how to define a Provisional Product that can be supplied as a trial product Product Management, Development Sentinel HASP Business Studio

Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,stillintheProductionManagementrole,youdefinethe MyNotepad_EvaluationProductasatrialversionofthe MyNotepad_FullProductyoudefinedinLesson 4DefiningProducts. YouthenassumetheDevelopmentroletopreparetheProductfor distributionbycreatingacustomizedSentinel HASPRuntime EnvironmentInstallerexecutablefile. AProvisionalProductistypicallyusedforevaluationpurposes,to enabletheprovisionofagraceperiod,orforsuperdistribution. A ProvisionalProductcanbeusedonanycomputerwithouta Sentinel HASPprotectionkeyforalimitedtimeperiodonly.After theallottedperiodexpires,thesoftwarenolongerruns,untilitis activatedwithaSentinel HASPprotectionkey.

30

Defining a Provisional Product

Defining a Provisional Product


Inthissection,intheProductionManagementrole,youdefinethe MyNotepad_EvaluationProductaProvisionalProductthatisa trialversionoftheMyNotepad_FullProduct,withalicensethat expires60 daysaftertheapplicationisfirstused. To define a Provisional Product: 1. 2. IntheFunctionpane,underLicensingPlan,selectManage Products. TheManageProductswindowisdisplayed. SelecttheMyNotepad_FullProduct,andintheTaskpane,clickNew Provisional.TheProvisionalProductforMyNotepad_Fullwindow isdisplayed. IntheGeneralarea,intheProduct Namefield,type MyNotepad_Evaluation.Notethat: TheBase ProductfielddisplaysMyNotepad_Full. TheDescriptionfielddisplaysProvisionalProductfor MyNotepad_Full. TheMyNotepadFeatureyoudefinedinLesson 2Defining FeaturesisincludedintheProductwithalicensefor30days. Thisisthedefaultnumberofdaysforalicensefora ProvisionalProduct. IntheFeatures In Productlist,selectMyNotepadandclickDefine.The DefineLicenseTermswindowisdisplayed. Inthe Days until expiration field,type60. ClickOK.TheDefineLicenseTermswindowclosesandthe updatedlicensetermsaredisplayedintheLicense Termsfieldinthe Features In Productlist. ClickOK.ThestatusofMyNotepad_Evaluationisdisplayedinthe ManageProductswindowasReady.

3.

4. 5. 6.

7.

Defining a Bundle of Provisional Products

31

Defining a Bundle of Provisional Products


Inthissection,youassumetheDevelopmentrole.Youbundlethe MyNotepad_EvaluationProvisionalProductthatwasdefinedby theProductManager.YouthencreateaSentinel HASPRuntime EnvironmentInstallerexecutablefilethatyouwillembedinyour programbeforeyouincludetheprogramintheProvisionalProduct bundle. To define a bundle of Provisional Products: 1. 2. 3. 4. 5. IntheFunctionpane,underProduction,selectDevelopment Tasks. The DevelopmentTaskswindowisdisplayed. IntheTaskpane,selectBundle Provisional Products.TheBundle ProvisionalProductswindowisdisplayed. VerifythatthecorrectBatchCodeisdisplayedintheBatch Code field. ClickAdd.TheProductswindowisdisplayed. SelectMyNotepad_Full [MyNotepad_Evaluation]andclickAdd.The ProductswindowclosesandtheMyNotepad_EvaluationProduct isdisplayedintheBundleProvisionalProductswindow.

Note:
Inthisprocedure,youareonlyaddingasingleProvisional ProductMyNotepad_EvaluationtotheProvisionalProduct bundle. 6. 7. 8. ClickProduce Now.TheProduceBundleofProvisionalProducts windowisdisplayed. InFile Type,selecttheV2C (VendortoCustomer) option. IntheFile Locationfield,clickthebrowsebutton.TheBrowseFor Folderwindowisdisplayed,pointingtothedefaultfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\v2c ClickOK.ThepathisdisplayedintheFile Locationfield.

9. 10. ClickGenerate File.TheV2Cfilecontainingthelicensing informationisgeneratedandasuccessmessageisdisplayed. 11. ClickOK.TheDevelopmentTaskswindowindicatesthatthe bundlehasbeencreated.

32

Defining a Provisional Product

Creating a Sentinel HASP Run-time Environment Installer


RemainingintheDevelopmentrole,younowcreateaSentinel HASP RuntimeEnvironmentInstallerexecutablethatincludestheV2Cfile youcreated.TheRuntimeEnvironmentmustbeinstalledontheend userscomputerinorderforyourSentinel HASPprotectedand licensedprogramtofunctioncorrectly. Youneedonlyembedtheinstallerinyoursoftwaresetuptocreatea readytorunSentinel HASPprotectedandlicensedprogram.Inthis scenario,youhavealreadyspecifiedthattheMyNotepadprogram willruninTrialmodeforamaximumof60 days. To generate a Sentinel HASP Run-time Environment Installer executable: 1. 2. 3. IntheFunctionpane,underProduction,selectDevelopment Tasks.The DevelopmentTaskswindowisdisplayed. IntheTaskpane,selectRTE Installer.TheGenerateRuntime EnvironmentInstallerwindowisdisplayed. IntheV2C File Locationfield,clickthebrowsebutton. TheSelectV2CFileforRTEInstallerwindowisdisplayed, pointingtothedefaultfolder:

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\v2c.

4.

5. 6. 7.

Doubleclickthev2cfiledisplayedinthislocation.Thepathtothe fileisdisplayedintheV2C File LocationfieldoftheGenerate RuntimeEnvironmentInstallerwindow. IntheFile Typefield,ensurethattheApplication (EXE)optionis selected. IntheOutput File Location field,clickthebrowsebuttonandcreatea foldercalledEvaluationProductsonyourdesktop. ClickOK.ThepathisdisplayedintheOutput File Location fieldofthe GenerateRuntimeEnvironmentInstallerwindow.

Creating a Sentinel HASP Run-time Environment Installer 8. 9.

33

ClickGenerate File.Amessageinformsyouthatthefilewas generated. ClickOK.TheDevelopmentTaskswindowindicatesthattheRTE (RuntimeEnvironment)Installerhasbeencustomizedtoinclude theV2Cfileyoucreated.

WARNING!
Donotexecutethegeneratedfileatthistime!Youwillinstallthis bundleinLesson 6CreatingandDistributingaHASP SLprotected SoftwareOrder. YouarenowreadytoshipyourProductwithitslicenselockedto eitheraHASP SLkeyasdescribedinLesson 6Creatingand DistributingaHASP SLprotectedSoftwareOrder,oraHASP HLkeyas describedinLesson 7CreatingandDistributingaHASP HLprotected SoftwareOrder.

34

Defining a Provisional Product

Lesson 6

Creating and Distributing a HASP SLprotected Software Order


Objective
Learn how to define an order locked to a HASP SL key, specify the customer for the order, and produce the order. Simulate a variety of end-user interactions with programs protected by Sentinel HASP protection keys.

Role in this lesson Applications used

Order Management, Production, End User Sentinel HASP Business Studio Sentinel HASP Remote Update System utility Admin Control Center

Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,youassumetheOrderManagementroleanddefinean order.Theorderprocessalsoentailsdefiningthecustomerand producingtheordersothatitisreadyforshipment. TheorderyoudefineisbasedontheMyNotepad_FullProductthat youdefinedinLesson 4DefiningProducts.Thelicenseislockedtoa HASP SLkeythatwillbeactivatedontheendusersmachineto convertthetrialMyNotepadsoftwaretoafullyfeaturedproduct. WhenyoudefinedtheProducts,youspecifiedthelicensetermsfor theFeaturesincludedwithinthoseProductsatthattime.Notethat insteadofspecifyingthelicensetermswhenyoudefinedtheProduct, youcouldhaveenabledthefunctionalityforspecifyingthelicense termsatthisstageaspartoforderprocessing.

36

Creating and Distributing a HASP SL-protected Software Order Inthislesson,youwillalsoassumetheenduserroletoinstallanduse theProduct.YouwillthenusetheHASP SLProductKeyreceived fromthevendortoconvertatrialversionofthesoftwaretoafully featuredprogram.

Note:
WhenacustomerwantstopurchaseadditionalFeaturesortoextend thecurrentlicenseforaProductthathasitslicenselockedtoa HASP SLkey,youcanupdatethedeployedlicense,asdescribedin CreatinganUpdateforaLicenseintheFieldon(page 45).

Defining a Perpetual License With a Product Key


Inthissection,youcreateanorderfortheMyNotepad_FullProduct thatyoudefinedinLesson 4DefiningProducts,lockedtoaHASP SL key.Thislicensewillthenbeusedtoconvertthetrial MyNotepad_EvaluationProductyoudefinedinLesson 5Defininga ProvisionalProducttoafullyfeaturedproduct. To define an order with a perpetual license: 1. IntheFunctionpaneoftheBusinessStudiowindow,under Production,selectManage Orders.TheManageOrderswindowis displayedintheMainpane. IntheTaskpane,clickNew.TheNewProductionOrderwindowis displayed. IntheCustomerarea,clickCreate New.TheNewCustomerwindowis displayed. IntheNamefield,typeBob Doe Ltd. ClickOK.TheNewCustomerwindowclosesandBob Doe Ltd.is displayedintheCustomer NamefieldoftheNewProductionOrder window. ClickAdd.TheProductswindowisdisplayed. SelectMyNotepad_FullandclickAdd.TheMyNotepad_FullProductis addedtotheOrderItemslist. IntheOrder Detailsarea,selecttheProduct Key-based option. ClickProduce Now.TheProduceProductKeyswindowisdisplayed.

2. 3. 4. 5.

6. 7. 8. 9.

Installing a Trial Product

37

10. IntheFile Locationfield,clickthebrowsebuttonandcreateafolder namedProductKeysonyourdesktop.Thisfolderwillstoreyour generatedProductKey. 11. AdefaultnameisprovidedintheFile Namefield. 12. ClickGenerate File.Thefileisproducedandasuccessmessageis displayed. 13. ClickNotoclosethedialogbox.Theorderisdisplayedinthe Manage Orderswindow.

Installing a Trial Product


Inthissection,yousimulatetheexperienceoftheenduserwhen installingandrunningyourMyNotepadtrialsoftwareprogram. Althoughinareallifeenvironmentyoursoftwareengineerwould typicallyembedtheRuntimeEnvironmentinstallationwhich includestheprovisionallicense(fortrialuse)intoyoursoftware installationsothatitexecutesaspartoftheinstallationprocess,inthis tutorialyouperformseveralinstallationandsimulationsteps. To install the Sentinel HASP Run-time Environment on an end-user machine: 1. 2. 3. 4. FromtheStartmenu,selectRun. ClickBrowseandnavigatetotheEvaluationProductsfolderyou createdonyourdesktop. Selectthehaspdinst.exefileandclickOpen.Thebrowsewindow closesandthefilepathisdisplayedintheOpenfield. IntheOpenfield,typeaspacefollowedby -iattheendofthefile path. Forexample:
"...\Desktop\EvaluationProducts\haspdinst.exe" -i

5.

ClickOK.TheSentinel HASPRuntimeEnvironmentisinstalled andasuccessmessageisdisplayed.

38

Creating and Distributing a HASP SL-protected Software Order To check the license status of the trial Product: 1. 2. 3. 4.
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected).

Navigatetothefollowingfolder:

DoubleclickMyNotepad.exe. Whiletheapplicationisrunning,fromtheStartmenu,select Programs > Aladdin > HASP SRM > Tools > Admin Control Center. IntheAdministrationOptionspane,selectHASP Keys.Allthe Sentinel HASPprotectionkeysthatareaccessibleonthe HASP LicenseManageraredisplayed.

5.

6.

LocatetheentryforyourkeyandclicktheFeaturesbuttoninthe Actionscolumn.TheFeaturesthatarelicensedinyourkeyare displayed. NotethattheLoginsfieldshowsthatthereiscurrentlyoneloginto MyNotepad_EvaluationandthattheRestrictionsfieldfor Feature ID 10indicatesthatthe60daytrialhasbegun. ClosetheMyNotepadprogram.

Activating a License With a Product Key


Inthissection,stillintheroleoftheenduser,youassumethatyou havepurchasedtheMyNotepad_Fullprogramandreceiveda HASP SLProductKeyfromthevendor.YouusetheProductKeyto convertthetrialversionofthesoftwaretoafullyfeaturedprogram thatislockedtoyourmachine. To simulate activation of the program: 1. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Tools > Online-Activation Demo.TheSentinel HASPActivationSampledialog boxisdisplayed.Thisdialogboxsimulatestheenduser experiencewhenactivatingalicense.Inreallife,usethe ActivationAPItointegratetheactivationprocessintoyour software. IntheProductKeyfolderonyourdesktop,openthe.txt filethat containstheProductKeyyougeneratedearlierinthislessonin DefiningaPerpetualLicenseWithaProductKeyon(page 36).

2.

Activating a License With a Product Key 3. 4. 5. 6.

39

CopytheProductKeyandpasteitintotheProduct Keyfield. ClickActivate.Amessageboxisdisplayedindicatingthatthe activationsimulationhasbeensuccessful. ClickOK.Themessageboxcloses. OpenSentinel HASPAdminControlCentertoseethatyounow haveaPerpetual licenseforFeature ID 10.

40

Creating and Distributing a HASP SL-protected Software Order

Lesson 7

Creating and Distributing a HASP HLprotected Software Order


Objective
Learn how to define orders locked to HASP HL keys, specify the customer for each order, and produce the orders Simulate a variety of end-user interactions with programs protected by Sentinel HASP protection keys Learn how to update a license in the field

Role in this lesson Applications used

Order Management, Production, End User Sentinel HASP Business Studio Sentinel HASP Remote Update System utility Admin Control Center

Note:
ThislessonisnotapplicableforHASP HL Basickeys. Inthislesson,youassumetheOrderManagementroleanddefinetwo differentorders.Theorderprocessentailsyoudefiningtheorder, defininganewcustomer,andproducingtheordersothatitisreadyfor shipment.Youalsoassumetheenduserroletotestdifferenttypesof Sentinel HASPprotectionkeysandlicenses. WhenacustomerwantstopurchaseadditionalFeatures,ortoextend thecurrentlicenseforyourprotectedprogram,youcanupdatethe deployedlicensewithouthavingtorecallorredeploykeys. Inthislesson,youwillalsoassumetheOrderManagementroleand learnhowtoupdatethedeployedlicense.

42

Creating and Distributing a HASP HL-protected Software Order TheordersyoudefinearebasedontheProductsthatyoudefinedin Lesson 4DefiningProducts,andinclude: AnorderfortheBounce_LiteProduct. AnorderfortheBounce_FullProduct.Thisorderwillbeused toupdatethelicenseontheHASP HLkeyprovidedtothe end userwiththeBounce_LiteProduct.Youwilllearnhowto convertitsfunctionalityfromBounce_LitetoBounce_Fullinthe field. WhenyoudefinedtheProducts,youspecifiedthelicensetermsfor theFeaturesincludedwithinthoseProductsatthattime.Notethat insteadofspecifyingthelicensetermswhenyoudefinedtheProduct, youcouldhaveenabledthefunctionalityforspecifyingthelicense termsatthisstageaspartoforderprocessing.

Defining a Rental Product Order With HASP HL Locking


Inthissection,youdefineanorderfortheBounce_LiteProduct, withitslicenselockedtoaHASP HLkey. To produce a HASP HL key-based order for a customer: 1. IntheFunctionpaneoftheBusinessStudiowindow,under Production,selectManage Orders.TheManageOrderswindowis displayedintheMainpane. IntheBatch Codefield,ensurethatyourBatchCodeisselected. IntheTaskpane,clickNew.TheNewProductionOrderwindowis displayed. IntheCustomerarea,clickCreate New.TheNewCustomerwindowis displayed. IntheNamefield,typeJohn Smith Ltd. ClickOK.TheNewCustomerwindowclosesandJohnSmith Ltd. isdisplayedintheCustomer NamefieldoftheNewProduction Orderwindow. ClickAdd.TheProductswindowisdisplayed. SelectBounce_LiteandclickAdd.TheBounce_LiteProductisadded totheOrderItemslist.

2. 3. 4. 5. 6.

7. 8.

Using an Application With a HASP HL Key To lock the license to a HASP HL key: 1. 2. 3. 4. 5.

43

6.

IntheOrder Detailsarea,selecttheHASP HL Keysoption. IntheNumber of keysfield,type1. ClickProduce Now.TheProduceHASP HLKeys windowis displayed. ConnecttheHASP HLkey,towhichyouwanttoburntheorder, toyourcomputer. ClickBurn Now.Abarisdisplayedshowingtheprogressoftheburn process.Whentheburnprocessiscomplete,theprogressbar closesandtheBurnedfieldintheProduceHASP HLKeyswindow indicatesthatonekeyhasbeenburned. ClickDonetoclosetheProduceHASP HLKeyswindow.

Note:
ThisprocedurecouldalsobeperformedbyapersonintheProduction role,whoisauthorizedtouseSentinel HASPBusinessStudioonlyfor thispurposeanddoesnothaveaccesstootherfunctions.

Using an Application With a HASP HL Key


Whenacustomerreceivesanapplicationyouprotectedwitha HASP HLkey,theactualkeymustbeaccessiblebytheapplicationin ordertoruntheprogram.Inthefollowingprocedure,youassumethe enduserroletotestBounce,withaBounce_Litelicenselockedtoa HASP HLkey. Inthispartofthelesson,youuseSentinel HASPAdminControl Centertomanagetheuseofyourlicensedsoftware.Inarealtime environment,asystemadministratorinyourcustomersorganization usesthisWebbasedapplicationtomanagenetworklicensesforyour software.

44

Creating and Distributing a HASP HL-protected Software Order To activate a Product protected with a HASP HL key: 1. ConnecttheHASP HLkeyonwhichyouburnedtheordertoyour computer.TherequiredlicensinginformationforBounce_Liteis contained,inencryptedformat,in thekey.Aslongasthelicenseis valid,theprotectedapplicationcanrun. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Tools > Admin Control Center.Sentinel HASPAdminControlCenteris displayed.Thisinterfaceenablescustomerstotrackthestatusand usageoftheirSentinel HASPlicenses. IntheAdministrationOptionspane,selectHASP Keys. All the Sentinel HASPprotectionkeysthatareaccessibleonthe HASP LicenseManageraredisplayed.

2.

3.

4.

5. 6.

LocatetheentryforyourHASP HLkeyandclicktheFeatures buttonintheActionscolumn.TheFeaturesthatarelicensedin yourkeyaredisplayed. NotethattheRestrictionsfieldforFeature ID 50displays Executions 3 left,indicatingthattheremainingnumberoflogins permittedbythelicenseis3. Navigatetothefollowingfolder:
\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected.

DoubleclickWin32_Bounce.exe.TheBouncingBallprogram launches. 7. ClosetheBouncesoftware. 8. Repeatstep 6andstep 7twice,toconsumeallthepermitted executions. 9. Repeatstep 6.Bouncefailstoopenandamessageisdisplayed indicatingthattheFeaturehasexpired. 10. InSentinel HASPAdminControlCenter,intheAdministration Optionspane,selectHASP Keys.AlltheSentinel HASPprotection keysthatareaccessibleontheHASP LicenseManagerare displayed.

Creating an Update for a License in the Field 11. LocatetheentryforyourHASP HLkeyandclicktheFeatures buttonintheActionscolumn.

45

Note:
Ifyouarenotsurewhichentryrelatestoyourspecifickey,click theBlink onbuttonandidentifythekeyonwhichtheLEDis blinking. NotethattheRestrictionsfieldforFeature ID 50displaysExpired, meaningthatthenumberofallowedloginsdefinedinthelicense hasbeenexhausted.

Creating an Update for a License in the Field


JohnSmithrequestedalicenseupgradefromBounce_Liteto Bounce_Full.Inthispartofthelesson,youwillassumetheOrder Managementroletocreateanupdateforthedeployedlicense,andthe Productionroletoproducetheorderfortheupdatedlicense.Youwill thenassumetheroleoftheenduser(JohnSmith)toactivatethe licenseupdate.

Note:
TherearemanywaystousetheSentinel HASPRemoteUpdate System(RUS)whenyousendlicenseupdatestoyourcustomers.For moreinformation,seeChapter12,Sentinel HASPRemoteUpdate SystemintheSentinel HASPSoftwareProtectionandLicensingGuide. Toproduceanorderforalicenseupdate: 1. IntheFunctionpaneoftheBusinessStudiowindow,under Production,selectManage Orders.TheManageOrderswindowis displayedintheMainpane. IntheTaskpane,clickNew.TheNewProductionOrderwindowis displayed. IntheCustomerarea,clickSearch.TheLocateCustomerwindowis displayed. IntheNamedropdownlist,selectJohn Smith Ltd. ClickOK.TheLocateCustomerwindowclosesand John Smith Ltd.isdisplayedintheCustomer Namefieldofthe ProductionOrderwindow.

2. 3. 4. 5.

46

Creating and Distributing a HASP HL-protected Software Order 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. ClickAdd.TheProductswindowisdisplayed. SelectBounce_FullandclickAdd.TheBounce_FullProductisadded totheOrderItemslist. IntheOrder Detailsarea,selecttheHASP Update option. ClickLocateTheLocateHASPKeyswindowisdisplayed. ClickLocate.Thekeyinformationisdisplayedintheuppertable. IntheHASP IDfield,notetheHASPIDnumberforJohn Smiths HASP HLkey. ClickAdd to List.TheinformationisaddedtotheHASP Keys to Update table. ClickOK.TheLocateHASPKeyswindowcloses. ClickProduce Now.TheProduceHASPUpdatewindowis displayed. InFile Type,selecttheV2C option. IntheFile Locationfield,clickthebrowsebutton.TheBrowseFor Folderwindowisdisplayed,pointingtothedefaultfolder:

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\v2c 17. ClickOK.ThepathisdisplayedintheFileLocationfield.

18. ClickGenerate File.Thefileisgeneratedandasuccessmessageis displayed. 19. ClickOK.TheProduceHASPUpdatewindowcloses. ThelicenseupdateisstoredasaV2Cfileinthisformat:

HASPUpdate_[OrderID]_[HASP KeyID].v2c where[OrderID] istheIDnumberassignedtotheneworder,and [HASP KeyID]istheHASP IDnumberthatyounotedinstep 11.

Updating a License at the Customers Site

47

Updating a License at the Customers Site


Inthissection,youretaintheroleofJohnSmithLtd.Having purchasedafullyfeaturedBounce_Fullversionoftheprogramto replacetheexecutionbasedBounce_Liteversion,youupdateyour licenseusingtheSentinel HASPRemoteUpdateSystem(RUS)and theHaspUpdate.v2cfileyoureceivefromthevendor. To activate a license update: 1. 2. EnsurethattheappropriateHASP HLkeyisconnectedtoyour computer. LaunchSentinel HASPAdminControlCenter,asfollows. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Tools > Admin Control Center.Sentinel HASPAdminControlCenteris displayed. IntheAdministrativeOptionspane,selectUpdate/Attach.The Update/AttachLicensetoHASPLicenseManagerwindowis displayed. ClickBrowseandnavigatetothefollowingfolder:

3.

4. 5.

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\v2c. SelecttheHASPUpdate_[OrderID]_[HASP KeyID].v2cfilethatyou

6. 7. 8. 9.

createdwhenproducingtheorderforthelicenseupdateinyour OrderManagementroleearlier,inCreatinganUpdateforaLicense intheFieldon(page 45). ClickOpen.ThefilepathisdisplayedintheSelect a V2C, H2R or ID file field. ClickApply File.Amessageisdisplayedconfirmingthatyour updatewasappliedsuccessfully. IntheAdministrativeOptionspane,selectHASP Keys. LocatetheentryforyourHASP HLkeyandclicktheFeatures button.TheFeaturesthatarelicensedinyourkeyaredisplayed. NotethatanadditionalrowiscreatedforFeature ID 50.The RestrictionsfieldinthisrowisPerpetual,indicatingthatthe remainingnumberofloginspermittedbythelicenseisunlimited.

48

Creating and Distributing a HASP HL-protected Software Order 10. Navigatetothefollowingfolder:

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorTools\VendorSuite\Protected. 11. DoubleclickWin32_Bounce.exe.TheBouncingBallprogram

launches. 12. ClosetheBouncingBallprogramanddisconnecttheHASP HL key.

Lesson 8

Using Sentinel HASP Run-time API


Objective Role in this lesson Applications used
Learn how to implement Sentinel HASP Run-time API functions using Sentinel HASP ToolBox Development Sentinel HASP ToolBox

Nowthatyouhavecompletedtheotherlessonsinthistutorial,you shouldhaveagoodunderstandingofhowSentinel HASPworks.This lessonbuildsonyouraccumulatedknowledgeandintroducesyouto theSentinel HASPRuntimeAPIthroughSentinel HASPToolBox, whichisaninteractiveGUIapplicationthathelpsyoufamiliarize yourselfwiththeSentinel HASPRuntimeAPI. TheSentinel HASPsystemoffersarichvarietyofAPIcallstosupport customizedprotectionofyourprogram,aswellasotheroperationson Sentinel HASPprotectionkeys. YoucanalsouseSentinel HASPToolBoxtogeneratesourcecodethat youcanimmediatelycopyandpasteintoyourownapplicationsource code.

50

Using Sentinel HASP Run-time API TheSentinel HASPToolBoxwindowincludesthefollowing: Functionpane,inwhichyouselectthefunctiontoperform Displaypane,inwhichyoucanviewandeditthedetailsofthe APIcallyouselected GeneratedCodepane,inwhichcodeisdisplayed.Youcancopy thiscodeandpasteitintoyourownfiles. Handlespane,inwhichthesessionhandleisdisplayed

Function pane

Display pane

Handles pane Generated Code pane

To launch Sentinel HASP ToolBox: 1. FromtheStartmenu,selectPrograms > Aladdin > HASP SRM > Vendor Suite.The Vendor Suiteprogramselectionwindowis displayed. ClickToolBoxtolaunchtheSentinel HASPToolBoxapplication. The loginwindowisdisplayed. ClickWork Offline.TheSentinel HASPToolBoxmainwindowis displayed. The FunctionpaneontheleftoftheToolBoxwindowlistsallthe availableSentinel HASPRuntimeAPIcalls. Browsethelist.YoucanselectanyAPIcallasyoubrowse.When makingaselection,theDisplaypaneontherightoftheToolBox windowdisplaystheparametersyoumustspecifyinorderto activatetheselectedAPIcall.

2. 3. 4. 5.

Selecting Your Programming Language

51

Selecting Your Programming Language


Sentinel HASPToolBoxcangeneratecodeinseveralprogramming languages. To select a programming language: 1. 2. 3. FromtheFile menu,selectSettings.TheSentinel HASPToolBox Settingswindowisdisplayed. SelecttheToolBoxtab. FromtheProgramming languagedropdownlist,selectyourpreferred language.

Note:
Forthepurposeofcompletingthistutorial,it isrecommended thatyouselectC-API. IfCAPIisnotselected,selectitandclickOK.IfCAPIisalready selected,clickCancel. TheSentinel HASPToolBoxSettingswindowcloseswiththe programminglanguageselected.

Login
EachSentinel HASPRuntimeAPIsessionmustbeginwiththe hasp_loginAPIcall,whichestablishesaconnectionwiththe connectedHASP HLkeyandenablesaccesstoitsresources. To log in to the HASP HL key: 1. 2. ConnectaHASP HLkey. IntheFunctionpane,selecthasp_login.TheDisplaypanedisplays alltheparameterswiththedefaultvaluesthatareappropriatefor theloginoperation. SpecifythelocationofyourstoredVendorCodefile. TolocateyourVendorCodefile,clickthebrowsebutton. Bydefault,VendorCodesarestoredin:

3.

\Documents and Settings\[logged_in_user_name]\My Documents\ Aladdin\HASP SRM [version]\VendorCodes

52

Using Sentinel HASP Run-time API Thefileisnamedaccordingtothelabelprintedonyourkeys. For example,ifthekeysarelabeledwithBatchCodeABCDE,by default,yourVendorCodefileisnamedABCDE.hvc. SelectyourVendorCodefileandclick Open.Thecodeisdisplayed intheVendor Code field. IntheFeature IDfield,type50.

4. 5.

Note:
IfyouareusingaHASP HL Basickey,select0intheFeature IDfield. 6. Atthebottomleftofthehasp_loginpane,clickExecute.The result oftheexecutedloginissummarizedtotherightofthe Execute buttoninthreeStatusfieldsnumber,codeandmessage.

Encrypting Data and Writing to Memory


Nowthatyouhaveestablishedasessionwiththeconnected Sentinel HASPprotectionkey,youcanaccessitsresourcesthroughother APIcalls. Oneofthemostimportantandpowerfulresourcesavailableina Sentinel HASPprotectionkeyisitsinternalencryptionengine.You canoptimizeprotectionbyusingthisengineandtheencryption facilitiesintheSentinel HASPapplicationasanadditionalmethodfor verifyingthatthecorrectkeyisaccessiblewhentheprotected programisrunning.Todothis,proceedasfollows: EncryptastringusingtheSentinel HASPprotectionkey Incorporatetheencryptedstringintotheapplicationsourcecode Defineyoursourcecodetosendtheencryptedstringtothekey fordecryptionandthentoverifytheresult Initsencryptedform,thestringpreventstheprogramfromrunning correctly.Theprotectedprogramwillrunonlyifitcandecryptthe string,andthiscanonlybeachievediftheSentinel HASPprotection keyisaccessible.Thissectiondemonstrateshowthekeyencryptsand decryptsastring.

Retrieving Sentinel HASP Key Information To encrypt a string: 1. 2. 3. 4.

53

IntheFunctionpane,selecthasp_encrypt.TheDisplaypanedisplays parametersforthehasp_encryptAPIcall. SpecifytheSizeas100. Clickthefirstdottotherightofthememoryeditor,onthefar rightofthewindow,andtype:SafeNet, Inc. ClickExecute.Notethatthestringhasbeenencryptedbythe Sentinel HASPprotectionkeyandisnowillegible.

Note:
BecauseSentinel HASPusesauniqueencryptionkeyforeach encryptionprocess,basedonyouruniqueSentinel HASPVendor keys,thestringyoutypeisencrypteddifferentlyfromanyother softwarevendor. 5. 6. IntheFunctionpane,selecthasp_decrypt.Theeditorstilldisplays theencryptedstring. ClickExecute.TheSentinel HASPprotectionkeydecryptsthe string.SafeNet, Inc.isnowdisplayedintheeditor.

Note:
If youareusingaHASP HL Basickey,youhavecompletedthe tutorial.ProceedtoWhatsNext?onpage 55.

Retrieving Sentinel HASP Key Information


Sentinel HASPToolBoxenablesyoutoretrievekeyrelated information.Inthissection,youusethehasp_get_sessioninfo functiontoretrieveinformationrelatingtotheidentityandmemory sizeoftheSentinel HASPkey.

54

Using Sentinel HASP Run-time API To retrieve Sentinel HASP key information: 1. IntheFunctionpane,underManagement,select hasp_get_sessioninfo.TheDisplaypanedisplaysparameters forthehasp_getsessioninfoAPIcall. IntheDisplaypane,fromtheFormat Templatedropdownlist,select HASP_KEYINFO.NotethatadescriptionoftheFormatdefinitionis displayedinthegrayboxbelowtheInformationfield. ClickExecute.TheInformationpanedisplaysXMLtagswith informationonthekey,including: TheuniqueIDnumberoftheconnectedkey ThekeyRead/Writememorysize ThekeyReadonlymemorysize

2.

3.

Reading and Programming Sentinel HASP Key Memory


Inthissection,youlogintoFeature ID 10ontheHASP SLkeythat youdefinedinLesson 4DefiningProducts,andreadthememoryof thekey. To log in to the Sentinel HASP protection key: FollowtheHASP HLkeyloginprocedureonpage 51,butthis time,instep 5,type10. To read the Sentinel HASP key memory: 1. IntheFunctionpane,underMemory,selecthasp_read.TheDisplay panedisplaysparametersforthehasp_readAPIcallandaneditor fortheSentinel HASPkeymemory. Inthememoryeditor,settheOffsetfieldto0andtheLengthfield to 50. ClickExecute.ThestringHello World,whichyoustoredinthekey inLesson 4DefiningProducts,isnowdisplayedinthememory editor.

2. 3.

Whats Next?

55

Whats Next?
ThisconcludestheSentinel HASPtutorial.Youarenowreadytouse theSentinel HASPapplicationstolicenseyoursoftwareandprotectit againstunauthorizeduse. ForadditionalinformationabouttheSentinel HASPsystem,referto theSentinel HASPSoftwareProtectionandLicensingGuideandtheHelp documentationavailableintheSentinel HASPapplications.

56

Using Sentinel HASP Run-time API

You might also like