IsCodeValid method
function TOgCodeBase.IsCodeValid : Boolean;
IsCodeValid method function TOgCodeBase.IsCodeValid : Boolean; |
IsCodeValid tests to see if the release code is valid.
IsCodeValid calls the CheckCode method and tests its result to see if the release code is valid. It returns True if the code is valid, otherwise False. Descendent components decode the release code and test to see if the signature value (the magic value as defined in the TCode record) is still valid.
You might need to perform additional tests to ensure that the data used to create the release code was not altered. For example, you could test whether the text string used to create a Simple Registration release code was altered. Since the string is not part of the release code (only a number derived from the string is embedded into the code), you cannot compare it to what is stored in the release code. You must create a temporary release code using the text string and the same expiration date and then compare the temporary release code to the stored one. If they dont match, someone has altered the text string.
See also: CheckCode