[ActiveLock-Development] CVS: alugen/lib ALUGENLib.vbp,1.2,1.3 Generator.cls,1.2,1.3 Globals.cls,1.1
Brought to you by:
ialkan
From: Thanh H. T. <th...@us...> - 2003-10-13 05:43:48
|
Update of /cvsroot/activelock/alugen/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1496 Modified Files: ALUGENLib.vbp Generator.cls Globals.cls IALUGenerator.cls ProductInfo.cls alugen.dll Log Message: Batch commit for 2.0.3 build. Renamed Code1 and Code2 in ProductInfo to VCode and GCode respectively. Index: ALUGENLib.vbp =================================================================== RCS file: /cvsroot/activelock/alugen/lib/ALUGENLib.vbp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ALUGENLib.vbp 22 Sep 2003 02:46:02 -0000 1.2 +++ ALUGENLib.vbp 13 Oct 2003 05:43:43 -0000 1.3 @@ -1,7 +1,7 @@ Type=OleDll -Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation -Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#..\..\activelock\src\ActiveLock2.dll#ActiveLock2 -Reference=*\G{9AC9BB25-D182-447E-8398-D8A8F40DE906}#1.0#0#..\..\alutil\alutil.dll#ActiveLockUtil +Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#stdole2.tlb#OLE Automation +Reference=*\G{C3B56087-6690-42ED-8914-633AA166AB41}#1.0#0#activelock2.dll#ActiveLock2 +Reference=*\G{9AC9BB25-D182-447E-8398-D8A8F40DE906}#1.0#0#alutil.dll#ActiveLockUtil Class=IALUGenerator; IALUGenerator.cls Class=Generator; Generator.cls Class=Globals; Globals.cls @@ -20,7 +20,7 @@ VersionCompatible32="1" MajorVer=2 MinorVer=0 -RevisionVer=2 +RevisionVer=3 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="The ActiveLock Software Group" Index: Generator.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/Generator.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Generator.cls 22 Sep 2003 02:46:02 -0000 1.2 +++ Generator.cls 13 Oct 2003 05:43:43 -0000 1.3 @@ -99,8 +99,8 @@ .Section = Section ProdInfo.Name = .Values("Name") ProdInfo.Version = .Values("Version") - ProdInfo.Code1 = .Values("Code1") - ProdInfo.Code2 = .Values("Code2") + ProdInfo.VCode = .Values("VCode") + ProdInfo.GCode = .Values("GCode") End With End Sub @@ -113,8 +113,8 @@ .Section = ProdInfo.Name & " " & ProdInfo.Version .Values("Name") = ProdInfo.Name .Values("Version") = ProdInfo.Version - .Values("Code1") = ProdInfo.Code1 '@todo Encrypt code1 and code2, possibly using something as simple as modCrypto.bas - .Values("Code2") = ProdInfo.Code2 + .Values("VCode") = ProdInfo.VCode '@todo Encrypt code1 and code2, possibly using something as simple as modCrypto.bas + .Values("GCode") = ProdInfo.GCode End With End Sub @@ -141,8 +141,8 @@ With MyIniFile .Section = Name & " " & Ver ProdInfo.Version = .Values("Version") - ProdInfo.Code1 = .Values("Code1") '@todo Decrypt code1 and code2 - ProdInfo.Code2 = .Values("Code2") + ProdInfo.VCode = .Values("VCode") '@todo Decrypt code1 and code2 + ProdInfo.GCode = .Values("GCode") End With Set IALUGenerator_RetrieveProduct = ProdInfo End Function @@ -184,7 +184,7 @@ Dim Lic As ProductLicense With ActiveLock - Set Lic = ActiveLock2.CreateProductLicense(ProdInfo.Name, ProdInfo.Code1, _ + Set Lic = ActiveLock2.CreateProductLicense(ProdInfo.Name, ProdInfo.VCode, _ ProdInfo.Version, .LockType, .LicenseType, strUser, ExpireDate, , strRegDate, strEncrypted) End With Dim strLic As String @@ -193,7 +193,7 @@ Debug.Print "strLic: " & vbCrLf & strLic ' sign it Dim strSig As String - strSig = ActiveLock2.RSASign(ProdInfo.Code1, ProdInfo.Code2, strLic) + strSig = ActiveLock2.RSASign(ProdInfo.VCode, ProdInfo.GCode, strLic) ' Create liberation key. This will be a base-64 encoded string of the whole license. Dim strLicKey As String @@ -201,12 +201,12 @@ ' update Lic with license key Lic.LicenseKey = strLicKey ' Print some info for debugging purposes -Debug.Print "Code1: " & ProdInfo.Code1 +Debug.Print "VCode: " & ProdInfo.VCode Debug.Print "Lic: " & strLic Debug.Print "Lic hash: " & ActiveLock2.MD5Hash(strLic) Debug.Print "LicKey: " & strLicKey Debug.Print "Sig: " & strSig -Debug.Print "Verify: " & ActiveLock2.RSAVerify(ProdInfo.Code1, strLic, ActiveLock2.Base64Decode(strLicKey)) +Debug.Print "Verify: " & ActiveLock2.RSAVerify(ProdInfo.VCode, strLic, ActiveLock2.Base64Decode(strLicKey)) Debug.Print "====================================================" ' Serialize it into a formatted string Index: Globals.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/Globals.cls,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Globals.cls 24 Aug 2003 18:06:36 -0000 1.1 +++ Globals.cls 13 Oct 2003 05:43:43 -0000 1.2 @@ -81,13 +81,13 @@ '' ' Instantiates a new ProductInfo object. ' -Public Function CreateProductInfo(ByVal Name As String, ByVal Ver As String, ByVal Code1 As String, ByVal Code2 As String) As ProductInfo +Public Function CreateProductInfo(ByVal Name As String, ByVal Ver As String, ByVal VCode As String, ByVal GCode As String) As ProductInfo Dim ProdInfo As New ProductInfo With ProdInfo .Name = Name .Version = Ver - .Code1 = Code1 - .Code2 = Code2 + .VCode = VCode + .GCode = GCode End With Set CreateProductInfo = ProdInfo End Function Index: IALUGenerator.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/IALUGenerator.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IALUGenerator.cls 22 Sep 2003 02:46:02 -0000 1.2 +++ IALUGenerator.cls 13 Oct 2003 05:43:43 -0000 1.3 @@ -67,7 +67,7 @@ ' GenKey(ByVal Name As String, ByVal Ver As String, ByVal ReqCode As String, LicType As Long, ExpireDate As String) ' to ' GenKey(objActiveLock As IActiveLock, ByVal ReqCode As String, ExpireDate As String) -' +' 10.13.03 - th2tran - Renamed Code1 and Code2 to VCode and GCode respectively. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -78,23 +78,34 @@ Private mstrProductFile As String Private mINIFile As New INIFile +'' +' Specifies the path where information about the products is stored. +' @param strPath Path string. +' Public Property Let StoragePath(strPath As String) +Attribute StoragePath.VB_Description = "Specifies the path where information about the products is stored." mstrProductFile = strPath mINIFile.File = strPath End Property '' -' Added a new product to the product store. +' Saves a new product information to the product store. ' Raises error if product already exists. +' @param ProdInfo Object containing product information to be saved. ' Public Sub SaveProduct(ProdInfo As ProductInfo) +Attribute SaveProduct.VB_Description = "Saves a new product information to the product store." End Sub '' ' Retrieves product information. +' @param Name Product Name +' @param Ver Product Version +' @return Object containing product information. ' Public Function RetrieveProduct(ByVal Name As String, ByVal Ver As String) As ProductInfo +Attribute RetrieveProduct.VB_Description = "Retrieves product information." End Function @@ -103,6 +114,7 @@ ' @return Array of ProductInfo objects. ' Public Function RetrieveProducts() As ProductInfo() +Attribute RetrieveProducts.VB_Description = "Retrieves all information about all products in the store." End Function @@ -114,6 +126,7 @@ ' @param Ver Product Version ' Public Sub DeleteProduct(ByVal Name As String, ByVal Ver As String) +Attribute DeleteProduct.VB_Description = "Removes a product from the store." End Sub @@ -125,5 +138,6 @@ ' @param ExpireDate Expiration Date ' Public Function GenKey(objActiveLock As IActiveLock, ByVal ReqCode As String, ExpireDate As String) As String +Attribute GenKey.VB_Description = "Generates liberation key for the specified product." End Function Index: ProductInfo.cls =================================================================== RCS file: /cvsroot/activelock/alugen/lib/ProductInfo.cls,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ProductInfo.cls 22 Sep 2003 02:46:02 -0000 1.2 +++ ProductInfo.cls 13 Oct 2003 05:43:43 -0000 1.3 @@ -64,7 +64,7 @@ ' 08.15.03 - th2tran - Created ' 09.21.03 - th2tran - Fixed bug: Name() property wasn't implemented. ' Originally, the methods were there but had no code. -' +' 10.13.03 - th2tran - Renamed Code1 and Code2 to VCode and GCode respectively. ' </pre> ' /////////////////////////////////////////////////////////////////////// @@ -79,6 +79,7 @@ '' ' Product Name +' @return Name string. ' Public Property Get Name() As String Name = mstrName @@ -89,6 +90,7 @@ '' ' Product version. +' @return Version string. ' Public Property Get Version() As String Version = mstrVer @@ -98,21 +100,23 @@ End Property '' -' Product Code 1 (public key) +' Product VCode. This is the public encryption key used to verify product license keys. +' @return Code string. ' -Public Property Get Code1() As String - Code1 = mstrCode1 +Public Property Get VCode() As String + VCode = mstrCode1 End Property -Friend Property Let Code1(sCode As String) +Friend Property Let VCode(sCode As String) mstrCode1 = sCode End Property '' -' Product Code 2 (private key) +' Product GCode. This is the private encryption key used to generate product license keys. +' @return Code string. ' -Public Property Get Code2() As String - Code2 = mstrCode2 +Public Property Get GCode() As String + GCode = mstrCode2 End Property -Friend Property Let Code2(sCode As String) +Friend Property Let GCode(sCode As String) mstrCode2 = sCode End Property Index: alugen.dll =================================================================== RCS file: /cvsroot/activelock/alugen/lib/alugen.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvs7741Gc and /tmp/cvsKdFGih differ |