Function ENCRYPT() Signature: Encrypt(cStringtoEncrypt, cSecretKey[, nEncryptionType[, nEncryptionMode]]) Parameters: cStringtoEncrypt - A plain text string that you want to have encrypted, such as "Hello World!" cSecretKey - A plain text string that is the Key you want used during encryption, such as "My_SeCrEt_KeY". Please note that keys may need to be of a particular length for certain types of encryption. Refer below for more information. nEncryptionType - There are currently 5 types of encryption available. The value of this parameter determines that type of encryption used and how long your Secret Key should be. A single character in Visual FoxPro is equal to 1 byte or 8 bits. So an encryption algorithm requiring a 128-bit key would need a Secret Key of 16 characters (16 x 8 = 128). 0 = AES128 (requires a 16 character Key) 1 = AES192 (requires a 24 character Key) 2 = AES256 (requires a 32 character Key) *Default 4 = Blowfish (requires a 56 character Key) 8 = TEA (requires a 16 character Key) 1024 = RC4 (Key can be any length) nEncryptionMode - There are three different modes available for the each of the encryption types listed above. They include: Electronic Code Book (ECB), Cipher Block Chaining (CBC) and Cipher Feedback Block (CFB). The nEncryptionMode parameter does not apply to RC4 encryption (nEncryptionType = 1024). 0 = ECB *Default 1 = CBC 2 = CFB Return Value: Character data type - the encrypted form of cStringtoEncrypt. Remarks: When saving the return value of Encrypt() function to a field in a table, remember that Visual FoxPro will append blanks to the end of the string in order to fill the character field to its designated length. This can cause problems when decrypting the data as the spaces will be considered part of the encrypted string. To work around this, I suggest placing a single CHR(0) at the end of the encrypted string when saving it to the table. Then when decrypting the data just the portion prior to the CHR(0) can be sent into the Decrypt() function. This does not apply when using RC4 encryption (nEncryptionType = 1024).