*!* 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>>You'd need to check that the right key was used. If a way to tell whether the correct key was used was added to the library this would decrease the overall security of the library by making it succeptible to brute force attacks among other things (the library would have to embed the key in the ciphertext so it could check it and this would not be a good thing). If you don't know what the right key should be or what the resultant plaintext should be when decrypting the ciphertext then there is no way to know whether the key used is the right one.