浏览代码

Use a SHA1 hash to check the key.

Martijn Laan 13 年之前
父节点
当前提交
c808d9d58e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Examples/CodeDlg.iss

+ 2 - 2
Examples/CodeDlg.iss

@@ -41,7 +41,7 @@ var
 procedure InitializeWizard;
 begin
   { Create the pages }
-
+  
   UserPage := CreateInputQueryPage(wpWelcome,
     'Personal Information', 'Who are you?',
     'Please specify your name and the company for whom you work, then click Next.');
@@ -150,7 +150,7 @@ begin
     finally
       ProgressPage.Hide;
     end;
-    if KeyPage.Values[0] = 'inno' then
+    if GetSHA1OfString('codedlg' + KeyPage.Values[0]) = '8013f310d340dab18a0d0cda2b5b115d2dcd97e4' then
       Result := True
     else begin
       MsgBox('You must enter a valid registration key. (Hint: The key is "inno".)', mbError, MB_OK);