home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / RKPLUS33 / RKP3ENC.DOC < prev    next >
Text File  |  1993-10-19  |  7KB  |  205 lines

  1.                                R k p 3 E n c
  2.  
  3.          RkPlus (tm) 3.x/compatible Encode Unit for RkPlus (tm) 3.3
  4.  
  5.                              by C. Scott Davis
  6.  
  7.                    Copyright (c) 1993 Serious Cybernetics
  8.  
  9.  
  10.           
  11.  
  12.                      T A B L E   O F   C O N T E N T S
  13.  
  14.     ===================================================================
  15.  
  16.           D e s c r i p t i o n                                Sec
  17.  
  18.           What Is Rkp3Enc? ................................... 1.0
  19.           Using Rkp3Enc ...................................... 2.0
  20.           Rkp3Enc Procedures ................................. 3.0
  21.           SetOwnerCode ....................................... 3.1
  22.           SetProgCode ........................................ 3.2
  23.           SetVerCode ......................................... 3.3
  24.           Additional Information On Rkp3Enc .................. 4.0
  25.           Copyright Notices .................................. 5.0
  26.  
  27.  
  28. 1.0 - What is Rkp3Enc?
  29.  
  30. Rkp3Enc is a Turbo Pascal (tm) unit that allows RkPlus(tm) 3.3 to generate 
  31. and use version 3.x/compatible keys.  It contains definitions for 
  32. SetOwnerCode, SetProgCode, and SetVerCode, as well as new encoding functions 
  33. for RkPlus(tm) 3.x.
  34.  
  35. If version 2.x/compatible keys are required, Rkp2Enc should be used instead; 
  36. or for additional security, user-written encoding functions may be defined 
  37. (see RKPLUS.DOC for more information).
  38.  
  39.  
  40. 2.0 - Using Rkp3Enc
  41.  
  42. To use Rkp3Enc, the programmer must place it AFTER RkPlus in the Uses 
  43. definition (as shown below).
  44.  
  45.   Uses
  46.     RkPlus, Rkp3Enc;
  47.  
  48. In addition, SetOwnerCode, SetProgCode and SetVerCode must be called, before 
  49. any RkPlus(tm) calls are made (otherwise the RkPlus(tm) function RkpError 
  50. will return InvalidParameter).  No other procedure or function calls are 
  51. needed, as Rkp2Enc is automatically activated when it is Used.
  52.  
  53. If Rkp3Enc is corrupt or has been tampered with, the RkPlus(tm) function 
  54. RkpError will return BadTPU.  If the RkPlus(tm) 3.2 version of Rkp3Enc is 
  55. used with any version other than 3.2, the RkPlus(tm) function RkpError will 
  56. return VersionMismatch.
  57.  
  58.  
  59. 3.0 - Rkp3Enc Procedures
  60.  
  61. The following Procedures are defined in Rkp3Enc:
  62.  
  63. SetOwnerCode
  64. SetProgCode
  65. SetVerCode
  66.  
  67.  
  68. 3.1 - SetOwnerCode
  69.  
  70. Procedure SetOwnerCode(Var v; b : Byte);
  71.  
  72. This procedure must be called before any of the RkPlus(tm) procedures or 
  73. functions. The variable v may be of any type, and b specifies the length of 
  74. v (up to 255 bytes).  The variable passed as v is used (along with the 
  75. variables passed to SetProgCode and SetVerCode) to generate the registration 
  76. keys.  This variable should probably be the same for all software written by 
  77. a single person/company.  Since is it used to cause your keys to be 
  78. different from those of other programmers who are also using RkPlus(tm), the 
  79. more cryptic this variable is, the more secure your keys will be.
  80.  
  81. Examples :
  82.  
  83. Var
  84.   s : String[30];
  85.  
  86.  
  87. s := 'Read$Make@Into';
  88. SetOwnerCode(s[1],Length(s));
  89.   
  90. Note that when the variable passed to SetOwnerCode is a string, the first 
  91. character of the string should be passed (rather than the string itself) and 
  92. the length should be the length of the string (Length) and not the size 
  93. (SizeOf).  This is to avoid having the length byte and the "garbage" bytes 
  94. at the end of a Pascal string used in the key encryption.
  95.  
  96. Var
  97.   a : Array[1 to 5] of LongInt;
  98.  
  99.  
  100. a[1] := $3C1F29EC;
  101. a[2] := $A446B902;
  102. a[3] := $6C568DA0;
  103. a[4] := $0B197E23;
  104. a[5] := $F8F501C7;
  105. SetOwnerCode(a,SizeOf(a));
  106.  
  107. IMPORTANT : You should NOT use any of the actual examples used here or in 
  108. the sample programmes included with RkPlus(tm).  If you do, anyone else who 
  109. uses the same example will have IDENTICAL keys!
  110.  
  111.  
  112. 3.2 - SetProgCode
  113.  
  114. Procedure SetProgCode(Var v; b : Byte);
  115.  
  116. This procedure must be called before any of the RkPlus(tm) procedures or 
  117. functions. The variable v may be of any type, and b specifies the length of 
  118. v (up to 255 bytes).  The variable passed as v is used (along with the 
  119. variables passed to SetOwnerCode and SetVerCode) to generate the 
  120. registration keys.  Unlike the variable passed to SetOwnerCode, this 
  121. variable doesn't need to be particularly cryptic.
  122.  
  123. Examples :
  124.  
  125. Var
  126.   s : String[15];
  127.  
  128.  
  129. s := 'RkStuff';
  130. SetProgCode(s[1],Length(s));
  131.  
  132. If you wrote a programme called RkSample and a programme called RkUtils and 
  133. you passed 'RkStuff' to SetProgCode in both programmes, a key for one 
  134. programme would work for the other (assuming that SetOwnerCode and 
  135. SetVerCode were also passed the same values in both programmes).
  136.  
  137. Var
  138.   t : String[10];
  139.  
  140.  
  141. t := 'RkSample';
  142. SetProgCode(t[1],Length(t));
  143.  
  144. If you wrote a programme called RkSample and a programme called RkUtils and 
  145. you passed 'RkSample' to SetProgCode in RkSample and passed a different 
  146. value to SetProgCode in RkUtils, a key for one would NOT work for the other.
  147.  
  148.  
  149. 3.3 - SetVerCode
  150.  
  151. Procedure SetVerCode(Var v; b : Byte);
  152.  
  153. This procedure must be called before any of the RkPlus(tm) procedures or 
  154. functions. The variable v may be of any type, and b specifies the length of 
  155. v (up to 255 bytes).  The variable passed as v is used (along with the 
  156. variables passed to SetOwnerCode and SetProgCode) to generate the 
  157. registration keys.  Unlike the variable passed to SetOwnerCode, this 
  158. variable doesn't need to be cryptic at all.
  159.  
  160. Examples :
  161.  
  162. Var
  163.   c : Char;
  164.  
  165.  
  166. c := '2';
  167. SetProgCode(c,SizeOf(c));
  168.  
  169. If you wrote a programme and passed '2' to SetVerCode in versions 2.0, 2.1 
  170. and 2.2 of the programme; and passed '3' to SetVerCode in version 3.0, the 
  171. same key would work for versions 2.x (assuming that SetOwnerCode and 
  172. SetVerCode were passed the same values in all versions), but version 3.0 
  173. would require a different key.
  174.  
  175. Var
  176.   r : Record
  177.         v : Byte;
  178.         u : Byte;
  179.       End;
  180.  
  181.  
  182. r.v := 1;
  183. r.u := 0;
  184. SetProgCode(r,SizeOf(r));
  185.  
  186. If you wrote a programme and passed r to SetProgCode with r.v set to the major 
  187. version and r.u set to the minor update, a key for one version would NOT work 
  188. for another.
  189.  
  190.  
  191. 4.0 - Additional Information On Rkp3Enc
  192.  
  193. For more information on using Rkp3Enc, see the sample Turbo Pascal (tm) 
  194. programmes (RKPDEMO3) that are distributed with RkPlus(tm), or contact me at 
  195. any of the locations listed in RKPLUS.DOC.
  196.  
  197.  
  198. 5.0 - Copyright Notices
  199.  
  200. RkPlus(tm) (c) 1991-93 Serious Cybernetics
  201. Rkp2Enc (c) 1990-93 Serious Cybernetics 
  202. Rkp3Enc (c) 1993 Serious Cybernetics
  203. Turbo Pascal (c) 1983-89 Borland International
  204.  
  205.