home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / RKEY12.ZIP / RKEY.DOC < prev    next >
Encoding:
Text File  |  1991-01-21  |  25.0 KB  |  757 lines

  1.  
  2.  
  3.                rKey v1.2/v1.2s (c) 1990, 1991 Serious Cybernetics
  4.                    Turbo Pascal(tm) 5.5 Registration Key Unit
  5.                                  by Scott Davis
  6.  
  7.  
  8. -------------------------------------------------------------------------------
  9.  
  10.  
  11. The following files should be included in RKEY12.ZIP :
  12.  
  13. RKEY.DOC            rKey Documentation
  14. RKEY.TPU            rKey Unit (v1.2 Has built-in string handling)
  15. RKEYS.TPU           rKey Unit (v1.2s Uses the StrLib Unit)
  16. RKSAMPLE.PAS        Sample program using rKey
  17. RKGENKEY.PAS        Sample program to generate keys for RKSAMPLE.PAS
  18. RKGENFIL.PAS        Sample program to generate a key file for RKSAMPLE.PAS
  19. RKBRAND.PAS         Sample program to brand RKSAMPLE.PAS with a valid key
  20. REGISTER.FRM        Registration form/information for rKey
  21. APPLIST.TXT         List of applications written using rKey
  22.  
  23.  
  24. -------------------------------------------------------------------------------
  25.  
  26.  
  27. rKey is a Turbo Pascal (tm) 5.5 Unit designed to allow programmers to easily
  28. handle registration keys in their software.  All of the key encryption,
  29. checking and key file routines are handled in rKey, requiring little effort
  30. on the part of the programmer.  It can allow anything from simple registration
  31. messages to limiting program functions if the software is not registered.
  32.  
  33.  
  34. There are two versions of rKey included here.  Version 1.2 is contained in
  35. RKEY.TPU, which has its own built-in string handling routines.  Version 1.2s
  36. is contained in RKEYS.TPU, which uses functions from the StrLib unit.  If
  37. you are using the StrLib unit in your programs, you will want to use RKEYS.TPU.
  38. Otherwise, you should use RKEY.TPU.
  39.  
  40.  
  41. All of the sample programs use RKEY.TPU.  If you have StrLib and want the
  42. sample programs to use RKEYS.TPU, simply change :
  43.  
  44.   Uses
  45.     rKey;
  46.  
  47. to
  48.  
  49.   Uses
  50.     rKeyS;
  51.  
  52.  
  53. The various sample programs demonstrate the 2 methods of handling keys :
  54.  
  55.   Method 1 : Distribute your program (for example, RKSAMPLE.EXE) and use
  56.              a key file generation program (like RKGENFIL.EXE), which you
  57.              do NOT distribute, to create a key file for each user who
  58.              registers.  You then send the user the key file.
  59.  
  60.   Method 2 : Distribute your program (for example, RKSAMPLE.EXE) and a
  61.              branding program (like RKBRAND.EXE).  You then use a key
  62.              generation program (like RKGENKEY.EXE), which you do NOT
  63.              distribute, to create a a key number for each user who
  64.              registers.  You then send the user the key number, which
  65.              he/she enters into the brand program to create a key file.
  66.  
  67.  
  68. -------------------------------------------------------------------------------
  69.  
  70.  
  71.                                 Version Notes :
  72.  
  73.     1.0/1.0s    19-October-1990      Initial release of rKey
  74.  
  75.     1.1/1.1s    1-December-1990      Changed rKey to store names as they are
  76.                                      entered (rather than forcing them to be
  77.                                      upper case).  Key creation/comparisons
  78.                                      are still NOT case sensitive.
  79.  
  80.                                      Fixed bug where altered key files would
  81.                                      sometimes cause a runtime error.  rKey
  82.                                      now handles this internally.  RegError
  83.                                      will be set to TRUE if key file is
  84.                                      altered.
  85.  
  86.     1.2/1.2s    21-January-1991      Recompiled with {$O+} to allow for use
  87.                                      in programs that use overlays.
  88.  
  89.  
  90. -------------------------------------------------------------------------------
  91.  
  92.  
  93. rKey contains procedures and functions to handle registration keys in
  94. Turbo Pascal (tm) 5.5
  95.  
  96.  
  97. The following constants are defined in rKey :
  98.  
  99.   rKeyVersion = '1.2';         { contains the current version of rKey }
  100.  
  101.  
  102. The following variables are defined in rKey :
  103.  
  104.   OwnerCode   : STRING[20];
  105.   ProgramCode : STRING[16];
  106.   KeyFileName : STRING[8];
  107.   KeyFilePath : STRING[79];
  108.   RegError    : BOOLEAN;
  109.   RegStatus   : BOOLEAN;
  110.   RegLevel    : BYTE;
  111.   RegName     : STRING[36];
  112.   RegYear     : WORD;
  113.   RegMonth    : WORD;
  114.   RegDay      : WORD;
  115.   RegKey      : STRING[12];
  116.  
  117.  
  118. The following procedures and functions are defined in rKey :
  119.  
  120.   FUNCTION MakeKey(Name : STRING; Level : BYTE) : STRING;
  121.   FUNCTION ValidKey(Name : STRING; Level : BYTE; Key : STRING) : BOOLEAN;
  122.   PROCEDURE GetRegInfo;
  123.   PROCEDURE Register(Name : STRING; Level : BYTE; Key : STRING);
  124.  
  125.  
  126. -------------------------------------------------------------------------------
  127.  
  128.  
  129. OwnerCode : STRING[20];
  130.  
  131. This variable is NOT initialized by rKey and MUST be set at the start of your
  132. program.  It is used (along with ProgramCode) to generate the registration
  133. keys.  This variable should probably be the same for all software written by a
  134. single person/company.  Since is it used to cause your keys to be different
  135. from those of other programmers who are also using rKey, the more cryptic this
  136. variable is, the more secure your keys will be.
  137.  
  138.  
  139. Examples :
  140.  
  141.   OwnerCode := 'TrendSoft, Inc.';
  142.  
  143. {
  144.  If the name of your company is 'TrendSoft, Inc.', this is probably NOT a good
  145.  OwnerCode.  It would be easy for someone who knows the name of the company
  146.  to use the rKey unit to write a program that will generate keys for your
  147.  software.
  148. }
  149.  
  150.   OwnerCode := 'Trend&&Soft/Inc@';
  151.  
  152. {
  153.  This is better.  It still uses the name of the company, but it is somewhat
  154.  masked by the insertion of other characters and would be harder for another
  155.  programmer to guess.
  156. }
  157.  
  158.   OwnerCode := 'Read$Make@Into';
  159.  
  160. {
  161.  This is MUCH better.  It uses totally unrelated words that would be extremely
  162.  unlikely to be used by another programmer/company.
  163. }
  164.  
  165.   OwnerCode := 'EkQW3#m,-%\uSaXo^Ej7';
  166.  
  167. {
  168.  This is most likely the best, since it uses totally random symbols.
  169. }
  170.  
  171. IMPORTANT : You should NOT use any of the actual examples used here or in
  172.             the sample programs included with rKey.  If you do, anyone else
  173.             who uses the same example will have IDENTICAL keys!
  174.  
  175.  
  176. -------------------------------------------------------------------------------
  177.  
  178.  
  179. ProgramCode : STRING[16];
  180.  
  181. This variable is NOT initialized by rKey and MUST be set at the start of your
  182. program.  It is used (along with OwnerCode) to generate the registration keys.
  183. There are several approaches to the use of ProgramCode :
  184.  
  185.   (1) If ProgramCode is set to the same value for several programs
  186.       written by a person/company, keys for one piece of software will
  187.       work on another piece of software.  Using this approach, you
  188.       could have a single key for several programs.
  189.  
  190.   (2) If each program has a different ProgramCode and the ProgramCode is
  191.       not changed when the program changes, keys for one version of the
  192.       program will work for all versions of the same program.
  193.  
  194.   (3) If each program has a differenct ProgramCode and the ProgramCode is
  195.       changed when the program is changed, a different key will be
  196.       required for each version of the program.
  197.  
  198.  
  199. Examples :
  200.  
  201.   ProgramCode := 'RkStuff';
  202.  
  203. {
  204.  If you wrote a program called RkSample and a program called RkUtils and
  205.  you defined the ProgramCode as 'RkStuff' in both programs, a key for one
  206.  program would work for the other.
  207. }
  208.  
  209.   ProgramCode := 'RkSample';
  210.  
  211. {
  212.  If you wrote a program called RkSample and a program called RkUtils and
  213.  you defined the ProgramCode as 'RkSample' in RkSample and used a different
  214.  ProgramCode in RkUtils, a key for one would NOT work for the other.
  215. }
  216.  
  217.   ProgramCode := 'RkSample One';
  218.  
  219. {
  220.  If you wrote a program called RkSample and you defined the ProgramCode as
  221.  'RkSample One' in versions 1.2, 1.2 and 1.2 and then changed the
  222.  ProgramCode to 'RkSample Two' for version 2.0, the same key would work for
  223.  versions 1.2, 1.2 and 1.2 but would NOT work for version 2.0.
  224. }
  225.  
  226.  
  227. -------------------------------------------------------------------------------
  228.  
  229.  
  230. KeyFileName : STRING[8];
  231.  
  232. This variable is NOT initialized by rKey and MUST be set at the start of your
  233. program.  It is the name of the keyfile that is read by GetRegInfo and written
  234. to by Register.  This will probably be the name of the program file.  The
  235. extension will be '.KEY'.
  236.  
  237.  
  238. Examples :
  239.  
  240.   KeyFileName := 'RKSAMPLE';
  241.  
  242. {
  243.  The key file will be 'RKSAMPLE.KEY'.  Key files are always created and read
  244.  from the same directory that the program is in.  This is true even if the
  245.  program is not in the current directory.
  246. }
  247.  
  248.  
  249. -------------------------------------------------------------------------------
  250.  
  251.  
  252. KeyFilePath : STRING[79];
  253.  
  254. This variable is initialized by rKey to ''.  GetRegInfo and Register will set
  255. KeyFilePath to the full directory, filename and extension of the key file.  If
  256. no key file was found, KeyFilePath will be set to ''.
  257.  
  258.  
  259. Examples :
  260.  
  261.   KeyFileName := 'RKSAMPLE';
  262.   GetRegInfo;
  263.   IF KeyFilePath <> '' THEN
  264.     WriteLn('Key file is ' + KeyFilePath);
  265.  
  266. {
  267.  The key file will be 'RKSAMPLE.KEY'.  After GetRegInfo is called, KeyFilePath
  268.  will contain the full pathname of the the key file, which is displayed (if it
  269.  is not '').
  270. }
  271.  
  272.  
  273. -------------------------------------------------------------------------------
  274.  
  275.  
  276. RegError : BOOLEAN;
  277.  
  278. This variable is initialized by rKey to FALSE.  It is set by GetRegInfo and
  279. Register to indicate an invalid key.  If RegError is TRUE after a call to
  280. GetRegInfo, it means that the key contained in the key file is invalid.  This
  281. probably means that the key file has been tampered with.  If RegError is set
  282. to TRUE after a call to Register, it means that the key that was passed to
  283. Register was invalid or the program was unable to create the key file; and the
  284. key file was NOT written.
  285.  
  286.  
  287. Examples :
  288.  
  289.   KeyFileName := 'RKDEMO';
  290.   GetRegInfo;
  291.   IF RegError THEN
  292.     WriteLn('The KEY file has been altered!');
  293.  
  294. {
  295.  This will call GetRegInfo.  If the key contained in 'RKDEMO.KEY' is invalid,
  296.  the message 'The KEY file has been altered!' will be displayed.
  297. }
  298.  
  299.  
  300. -------------------------------------------------------------------------------
  301.  
  302.  
  303. RegStatus : BOOLEAN;
  304.  
  305. This variable is initialized by rKey to FALSE.  It is set by GetRegInfo and
  306. Register to indicate the software is registered.  If RegStatus is TRUE then
  307. RegName, RegDate, RegLevel, RegYear, RegMonth and RegDay contain valid
  308. registration information.  If RegStatus is FALSE (after a call to GetRegInfo),
  309. the software is unregistered.
  310.  
  311.  
  312. Examples :
  313.  
  314.   KeyFileName := 'RKDEMO';
  315.   GetRegInfo;
  316.   Write('RkDemo v1.5');
  317.   IF RegError THEN
  318.     WriteLn('[invalid key]')
  319.   ELSE IF RegStatus THEN
  320.     WriteLn('[registered]')
  321.   ELSE
  322.     WriteLn('[unregistered]');
  323.  
  324. {
  325.  This will call GetRegInfo.  If the key contained in 'RKDEMO.KEY' is invalid,
  326.  the message 'RkDemo v1.5 [invalid key]' will be displayed.  If the program
  327.  is registered, the message 'RkDemo v1.5 [registered]' will be displayed.
  328.  Otherwise, the message 'RkDemo v1.5 [unregistered]' will be displayed.
  329. }
  330.  
  331.  
  332. -------------------------------------------------------------------------------
  333.  
  334.  
  335. RegName : BYTE;
  336.  
  337. This variable is initialized by rKey to ''.  It is set by GetRegInfo and
  338. Register if the software is registered.  This variable only contains valid
  339. information if RegStatus is TRUE.
  340.  
  341.  
  342. Examples :
  343.  
  344.   KeyFileName := 'RKDEMO';
  345.   GetRegInfo;
  346.   Write('RkDemo v1.5');
  347.   IF RegError THEN
  348.     WriteLn('[invalid key]')
  349.   ELSE IF RegStatus THEN
  350.     WriteLn('[registered to ' + RegName + ']')
  351.   ELSE
  352.     WriteLn('[unregistered]');
  353.  
  354. {
  355.  This will call GetRegInfo.  If the key contained in 'RKDEMO.KEY' is invalid,
  356.  the message 'RkDemo v1.5 [invalid key]' will be displayed.  If the program
  357.  is registered, the message 'RkDemo v1.5 [registered to NAME]' will be displayed
  358.  (with 'NAME' replaced by the name of the person that the software is
  359.  registered to).  Otherwise, the message 'RkDemo v1.5 [unregistered]' will be
  360.  displayed.
  361. }
  362.  
  363.  
  364. -------------------------------------------------------------------------------
  365.  
  366.  
  367. RegLevel : BYTE;
  368.  
  369. This variable is initialized by rKey to 0.  It is set by GetRegInfo and
  370. Register if the software is registered.  This variable only contains valid
  371. information if RegStatus is TRUE.  RegLevel should always be 0, if you do not
  372. wish to use registration levels in your software.  If registration levels are
  373. used, RegLevel will indicate the level at which a person is registered and
  374. each registration level will require a different key.
  375.  
  376.  
  377. Examples :
  378.  
  379.   KeyFileName := 'RKMISC';
  380.   GetRegInfo;
  381.   WriteLn('RkMisc v2.1 Menu');
  382.   WriteLn;
  383.   IF RegError THEN
  384.     WriteLn('*** invalid registration ***')
  385.   ELSE BEGIN
  386.     WriteLn('[D]isplay demos');
  387.     IF RegStatus THEN BEGIN
  388.       WriteLn('[E]nter data');
  389.       WriteLn('[P]rint reports');
  390.       IF RegLevel > 0 THEN
  391.         WriteLn('[G]raphs');
  392.       IF RegLevel > 1 THEN
  393.         WriteLn('[O]ther functions');
  394.     END;
  395.   END;
  396.  
  397. {
  398.  This will call GetRegInfo.  If the key contained in 'RKMISC.KEY' is invalid,
  399.  the message '*** invalid registration ***' will be displayed and no menu items
  400.  will be available.  If the software is unregistered, the following menu will
  401.  be displayed :
  402.  
  403.    RkMisc v2.1 Menu
  404.  
  405.    [D]isplay demos
  406.  
  407.  If the software is registered at level zero (say for a $5 registration), the
  408.  following menu would items would be available :
  409.  
  410.    RkMisc v2.1 Menu
  411.  
  412.    [D]isplay demos
  413.    [E]nter data
  414.    [P]rint reports
  415.  
  416.  If the software is registered at level one (say for a $10 registration), the
  417.  following menu items would be available :
  418.  
  419.    RkMisc v2.1 Menu
  420.  
  421.    [D]isplay demos
  422.    [E]nter data
  423.    [P]rint reports
  424.    [G]raphs
  425.  
  426.  If the software is registered at level two or higher (say for a $20 or more
  427.  registration), the following menu items would be available :
  428.  
  429.    RkMisc v2.1 Menu
  430.  
  431.    [D]isplay demos
  432.    [E]nter data
  433.    [P]rint reports
  434.    [G]raphs
  435.    [O]ther functions
  436.  
  437.  In this way you can allow different levels of registration to allow the
  438.  program to provide different functions, WITHOUT having distribute different
  439.  programs for each registration level.
  440. }
  441.  
  442.  
  443. -------------------------------------------------------------------------------
  444.  
  445.  
  446. RegYear  : WORD;
  447. RegMonth : WORD;
  448. RegDay   : WORD;
  449.  
  450. These variables are initialized by rKey to 0.  They are set by GetRegInfo and
  451. Register if the software is registered.  These variables only contain valid
  452. information if RegStatus is TRUE.  These variables contain the year, month and
  453. day that the software was registered (when the KEY file was created).
  454.  
  455.  
  456. Examples :
  457.  
  458.   GetDate(cYear,cMonth,cDay,cDow);  { from the Dos unit }
  459.   KeyFileName := 'RKPROG';
  460.   GetRegInfo;
  461.   IF RegError THEN
  462.     WriteLn('Error in KEY file!')
  463.   ELSE IF RegStatus THEN BEGIN
  464.     IF (cYear > RegYear) OR ((cYear = RegYear) AND (cMonth> RegMonth)) THEN
  465.       WriteLn('Your 1 month evaluation key has expired.  Please register.');
  466.   END;
  467.  
  468. {
  469.  This will call GetRegInfo.  If the key contained in 'RKPROG.KEY' is invalid,
  470.  the message 'Error in KEY file!' will be displayed.  If the current year is
  471.  greater than the registration year or the year is the same and the current
  472.  month is greater than the registration month, the following message will be
  473.  displayed :
  474.  
  475.    'Your 1 month evaluation key has expired.  Please register.'
  476.  
  477.  The date is not used in key generation.  It is simply written to the key
  478.  file when Register is called.  Therefore, the inclusion of the date was not
  479.  intended for use in writing "crippleware" (ie: software that becomes invalid
  480.  after a specified period of time), but rather to allow you to include an
  481.  evaluation key with the program and display a reminder message after a
  482.  specified period of time.
  483. }
  484.  
  485.  
  486. -------------------------------------------------------------------------------
  487.  
  488.  
  489. RegKey : STRING[12];
  490.  
  491. This variable is initialized by rKey to '000000000000'.  It is set by
  492. GetRegInfo and Register if the software is registered.  This variable only
  493. contains valid information if RegStatus is TRUE.  This contains the
  494. 12 digit hexadecimal registration key as a string.
  495.  
  496.  
  497. Examples :
  498.  
  499.   KeyFileName := 'RKMORE';
  500.   GetRegInfo;
  501.   IF RegError OR NOT RegStatus THEN BEGIN
  502.     WriteLn('This version of RkMore is not registered.');
  503.     WriteLn('Please read the READ.ME file for more info.');
  504.   END ELSE
  505.     WriteLn('This version of RkMore is registered to ' + RegName + '.');
  506.     WriteLn('Registration key is ' + RegKey + '.');
  507.   END;
  508.  
  509. {
  510.  This will call GetRegInfo.  If the key contained in 'RKMORE.KEY' is invalid
  511.  or the program is not registered, a message will be displayed telling the
  512.  user how to register the program.  Otherwise, the name of the person that
  513.  that the program is registered to and the registration key will be
  514.  displayed.
  515. }
  516.  
  517.  
  518. -------------------------------------------------------------------------------
  519.  
  520.  
  521. FUNCTION MakeKey(Name : STRING; Level : BYTE) : STRING;
  522.  
  523. The function MakeKey will return a string containing the 12 digit hexadecimal
  524. registration key for Name and Level (using the pre-defined values of OwnerCode
  525. and ProgramCode).  If you do not wish to use registration levels, simply
  526. pass a 0 as the Level parameter.  This function is usually used to create
  527. registration keys or key files, in a program that is not distributed to the
  528. user.
  529.  
  530.  
  531. Examples :
  532.  
  533.   OwnerCode := 'AZ771N91P03DJSS447';
  534.   ProgramCode := 'RkProg';
  535.   WriteLn('Registration Key Maker for RkProg');
  536.   WriteLn;
  537.   WriteLn('FOR INTERNAL USE ONLY!');
  538.   WriteLn;
  539.   Write('Enter name : ');
  540.   ReadLn(n);
  541.   k := MakeKey(n,0);    { registration levels are not being used }
  542.   WriteLn;
  543.   WriteLn('Registration key is '+k);
  544.  
  545. {
  546.  This will display a warning message and then prompt for a name.  MakeKey is
  547.  then passed the name and a 0 for the registration level.  It will return the
  548.  key in the variable k, which is then displayed.
  549. }
  550.  
  551.  
  552. -------------------------------------------------------------------------------
  553.  
  554.  
  555. FUNCTION ValidKey(Name : STRING; Level : BYTE; Key : STRING) : BOOLEAN;
  556.  
  557. ValidKey will return TRUE, if Key is valid for Name and Level (using the
  558. pre-defined values of OwnerCode and ProgramCode).  If you do not wish to use
  559. registration levels (and levels weren't used when the key was generated),
  560. simply pass 0 as the Level parameter.  If ValidKey returns FALSE, the key is
  561. not valid.
  562.  
  563.  
  564. Examples :
  565.  
  566.   OwnerCode := 'dfk89ew32zg0imm02';
  567.   ProgramCode := 'RkProg One';
  568.   WriteLn('RkProg v1.3');
  569.   WriteLn;
  570.   Write('Enter your name : ');
  571.   ReadLn(n);
  572.   Write('Enter your registration key : ');
  573.   ReadLn(k);
  574.   IF NOT ValidKey(n,0,k) THEN BEGIN        { registration levels are not used }
  575.     WriteLn('Invalid key!');
  576.     Halt(1);
  577.   END;
  578.  
  579. {
  580.  This program will prompt the user to enter a name and a registration key.
  581.  If the registration key is not valid, the program will display 'Invalid key!'
  582.  and Halt with an errorlevel of 1.
  583. }
  584.  
  585.  
  586. -------------------------------------------------------------------------------
  587.  
  588.  
  589. PROCEDURE GetRegInfo;
  590.  
  591. GetRegInfo will read the key file (if it exists) and set the value of the
  592. following variables :
  593.  
  594.   RegError    { set to TRUE if the key file contains an invalid key }
  595.   RegStatus   { set to TRUE if the software is registered }
  596.   RegName     { set to the name of the person the software is registered to }
  597.   RegLevel    { set to the registration level (0 if not used) }
  598.   RegYear     { set to the registration year }
  599.   RegMonth    { set to the registration month }
  600.   RegDay      { set to the registration day }
  601.   RegKey      { set to the 12 digit hexadecimal registration key }
  602.  
  603. GetRegInfo would generally be called near the beginning of a program (after
  604. OwnerCode, ProgramCode and KeyFileName are defined).
  605.  
  606.  
  607. Examples :
  608.  
  609.   OwnerCode := '&,<;(##@["+|~~**=#))';
  610.   ProgramCode := 'RkTest';
  611.   KeyFileName := 'RKTEST';
  612.   GetRegInfo;
  613.   IF NOT RegError THEN
  614.     IF RegStatus THEN
  615.       WriteLn('Registered to ' + RegName);
  616.  
  617. {
  618.  GetRegInfo will read 'RKTEST.KEY'.  If it contains an invalid key, RegError
  619.  will be set.  If it doesn't exist, RegStatus will be set to FALSE.  Otherwise,
  620.  The various registration variables will be set.  The program then displays
  621.  the name of the person that the program is registered to.
  622. }
  623.  
  624.  
  625. -------------------------------------------------------------------------------
  626.  
  627.  
  628. PROCEDURE Register(Name : STRING; Level : BYTE; Key : STRING);
  629.  
  630. Register will update the key file (creating it, if it doesn't exist) and set
  631. the value of the following variables :
  632.  
  633.   RegError    { set to TRUE if the Key parameter is invalid }
  634.               { or the file can NOT be created              }
  635.   RegStatus   { set to TRUE }
  636.   RegName     { set to the Name parameter }
  637.   RegLevel    { set to the Level parameter }
  638.   RegYear     { set to the registration year }
  639.   RegMonth    { set to the registration month }
  640.   RegDay      { set to the registration day }
  641.   RegKey      { set to the Key parameter }
  642.  
  643. If the Key parameter is invalid, RegError will be set to TRUE, the key file
  644. will NOT be written and the values of the other registration variables will
  645. NOT be changed.  Register would generally be called by an install or branding
  646. program of some type.  It can also be used by a key creation program, which
  647. is not distributed (if you want to send key files to registered users, rather
  648. than a key that they would enter).
  649.  
  650.  
  651. Examples :
  652.  
  653.   OwnerCode := 'Keyboard*Sytem=Load';
  654.   ProgramCode := 'RkProg';
  655.   KeyFileName := 'RKPROG';
  656.   WriteLn('RkProg Install Program');
  657.   WriteLn;
  658.   Write('Enter your name : ');
  659.   ReadLn(n);
  660.   Write('Enter your registration key : ');
  661.   ReadLn(k);
  662.   Register(n,0,k);       { registration level not used }
  663.   IF RegError THEN
  664.     WriteLn('Invalid Key.  Program not installed.');
  665.  
  666. {
  667.  This program will prompt the user for a name and a registration key.  Register
  668.  will then be passed the name, 0 for the Level (which is not being used) and
  669.  the key.  If RegError is TRUE, the key was invalid and no key file was written
  670.  (the program displays 'Invalid Key.  Program not installed.').  Otherwise,
  671.  RKPROG.KEY is written and the registration variables are set.
  672. }
  673.  
  674.  
  675. -------------------------------------------------------------------------------
  676.  
  677.  
  678. For more information on using rKey, see the sample Turbo Pascal (tm) programs
  679. that are distributed with rKey, or contact me at any of the locations listed
  680. below.
  681.  
  682.  
  683. -------------------------------------------------------------------------------
  684.  
  685.  
  686. rKey is shareware. You may copy and distribute RKEY11.ZIP freely, as well
  687. as use it for development of programs for your own use, to give away or to
  688. sell.  All I ask is that you include all of the original files, unmodified,
  689. and that you do not charge for the distribution of rKey itself.
  690.  
  691.  
  692. If you like rKey and use it to develop software, a registration fee of $10
  693. or more toward the continued development of this unit and others like it
  694. would be appreciated.  See REGISTER.FRM for registration information.
  695.  
  696.  
  697. Everyone registering rKey with a registration fee of $10 or more, will be
  698. entitled to have one piece of software (written using rKey) listed, along with
  699. an address or phone number, in an application list that will be included with
  700. all future versions of rKey.  (Registration fees in excess of $10 will allow
  701. for additional programs to be listed.)
  702.  
  703.  
  704. There are no royalties for the distribution of programs that are written
  705. with rKey.  A single registration fee entitles you to write and distribute
  706. any number of programs using rKey.
  707.  
  708.  
  709. If you have written an application using rKey, and wish to have it listed
  710. in the APPLIST.TXT file that is distributed with rKey, please send the
  711. following information via E/Mail, NetMail or US Mail :
  712.  
  713.   Name of Application
  714.   Programmer's Name (optional)
  715.   Copyright Notice
  716.   Address or Phone Number
  717.   System Requirements
  718.   Cost of Program (optional)
  719.  
  720.  
  721. Questions, comments, and suggestions are welcome.
  722.  
  723. Send E/Mail to   Scott Davis
  724.                  Phoenix StarFighter BBS (2400 bps)
  725.                  Phone (404) 869-3410
  726.                  FidoNet Node 1:3616/20
  727.  
  728. Send US Mail to  Scott Davis
  729.                  Rt. 2 Box 95
  730.                  County Line Drive
  731.                  Lula, GA 30554
  732.  
  733.  
  734. -------------------------------------------------------------------------------
  735.  
  736.  
  737. I'd like to thank Danny Sosebee (Sysop of Phoenix StarFighter BBS) for
  738. allowing me to use his BBS as a way to receive suggestions and comments
  739. regarding rKey.  Also, I'd like to thank Ed Ivey (Sysop of Ed's Place
  740. BBS - 404/532-1978 - FidoNet Node 1:3616/1) for his continued support
  741. and assistance in distributing my little software "projects".
  742.  
  743.  
  744. -------------------------------------------------------------------------------
  745.  
  746.  
  747.           Turbo Pascal (tm) units available from Serious Cybernetics :
  748.  
  749.             StrLib v1.2          A Library of String Functions
  750.             rKey v1.2/v1.2s      A Unit to Handle Registration Keys
  751.  
  752.  
  753. ------------------------------------------------------------------------------
  754.  
  755. rKey, StrLib (c) 1990, 1991 Serious Cybernetics
  756. Turbo Pascal (c) 1983, 1989 Borland International
  757.