newyuppie
Joined: 07 Nov 2006 Posts: 12 Location: San Diego, CA, USA
|
Posted: Sun Nov 12, 2006 12:07 am Post subject: Reading different sections from .lic files |
|
|
hi,
i've been exploring a bit with Custom generating my licenses. I was hoping to achieve a hybrid between CustomLicensedApp and LicensedApp projects. meaning, i would like the functionality of having a license for a particular person, but storing all this info in a .lic file.
for example, i would love to have the .lic file say something like this:
#START .LIC FILE
[license]
9C38-9F3B-7DD5-36AB-907E-16F3-861C-755D
[name]
John Smith
#END FILE
this way, i would like to use code in my program like this for example:
Dim sProvider As New EncryptedLicenseProvider
Dim sLicense As EncryptedLicense = sProvider.GetLicense(LICENSE_PARAMETERS, LICENSE_FILE)
and get a valid sLicense (as it is now, because it reads the whole .lic file, i get an invalid license file).
and why i want this? well, if the .lic file is divided into sections, i could now check the stored parameters in the license, and check the Name i generated in the stored parameter, against the name stored in the .lic file in the [name] section. Otherwise, i would have no way of checking the license stored name against anything, unless i provide a textbox each time the user logs into my application and types in his name.
I know it could be done as in the CustomLicensedApplication example, where you store the name in a Settings file. My approach described above would be a workaround to that. And would provide the user a way to simply copy the .lic file around and have the app work anyways. otherwise, he would have to copy the .lic file, and the app settings file, and this would be an extra step which could be avoided.
Obviously if we embrace this approach, there is also the possibility of storing the license and other parameters (which you will check against the ones in the license number) in a XML file. if this were so, we could store a lot of info in the XML file very easily as there are a lot of methods in VB to read and store from XML files.
thanks ans sorry for the length of this post.
PA |
|