*!* Here's how you check what the user entered >>?CheckUserLicense("12345555666677778888") && user entered a license let's check it >>?CheckUserLicense("11113333444455556666") && user entered another license let's check it >> >>*!* In application itself would be the following function >>*!* Note that neither the key, the plaintext, or even the ciphertext >>*!* exists in the function. We will use what the user entered in >>*!* and check the hash of the resulting ciphertext >>************************************ >>FUNCTION CheckUserLicense(tcEnteredByUser) >>************************************ >>LOCAL lcPlaintext, lcSecretKey, lcCipherText, lcMessageDigest, llReturn >>m.lcPlaintext = LEFT(m.tcEnteredByUser,4) >>m.lcSecretKey = Right(m.tcEnteredByUser,16) >>SET LIBRARY TO LOCFILE("vfpencryption71.fll") >>m.lcCipherText = Encrypt(m.lcPlaintext, m.lcSecretKey, 0, 0) >>m.lcMessageDigest = STRCONV(Hash(m.lcCipherText,1),15) >>m.llReturn = m.lcMessageDigest = "DC2F6812CFD76CF41A287FC4F4B0A3213BE094AD" && see below >>RETURN m.llReturn >> >>*!* In preparation we need to get the hex equivalent of a hash >>*!* this would be done during development and would not appear in the application >>*!* source code >>*!* LOCAL lcPlaintext, lcSecretkey, lcCipherText, lcMessageDigest >>*!* SET LIBRARY TO LOCFILE("vfpencryption71.fll") >>*!* m.lcPlaintext = "1111" >>*!* m.lcSecretkey = "3333444455556666" >>*!* m.lcCipherText = Encrypt(m.lcPlaintext, m.lcSecretKey, 0, 0) >>*!* m.lcMessageDigest = STRCONV(Hash(m.lcCipherText,1),15) >>*!* _cliptext = m.lcMessageDigest && put the message digest on the clipboard so we can paste it into our CheckUserLicense >>>