Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_dbfdecrypt():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_DBFdecrypt():

  Syntax:   Sx_DBFdecrypt()

  Returns:   Logical value.  TRUE (.T.) if the table is successfully
             decrypted, FALSE (.F.) if not.

  Description:  Decrypts a table previously encrypted with Sx_DBFencrypt().
                No password value needs to be specified, as this function
                uses the password value used in the USE...PASSWORD command,
                or as set by the Sx_SetPass() function.

  Example:

    // Open TEST.DBF and set FOOBAR as the encryption password for this
    // workarea.  Then, decrypt TEST.DBF

    USE test VIA "SIXCDX" PASSWORD "foobar" EXCLUSIVE
    ? "Decrypting TEST.DBF: "
    ?? iif( Sx_DBFdecrypt(), "OK", "ERROR" )


    // Open TEST2.DBF and set BOGUS as the encryption password for this
    // workarea.  Then, decrypt TEST2.DBF.

    USE test2 VIA "SIXCDX" NEW EXCLUSIVE
    Sx_SetPass( "BOGUS" )
    ? "Decrypting TEST2.DBF: "
    ?? iif( Sx_DBFdecrypt(), "OK", "ERROR" )

  NOTE:  You must have EXCLUSIVE use of the target database file before
         calling this function.

  ANOTHER NOTE:  If you accidentally decrypt a DBF file with the wrong
                 password, you'll need to follow these steps to decrypt
                 it properly:

                   1.  Re-Encrypt the table using the same WRONG password.
                   2.  Now decrypt the DBF file with the correct password.


See Also: Sx_DBFencrypt() Sx_Encrypt() Sx_Decrypt() Sx_SetPass() Sx_TableType()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson