← Back to Knowledge Base

KB #240023: DBF becomes decrypted after xBase PACK command

⏱️ 1 min read
Type: Tip
Summary:
This explains why an encrypted DBF might become decrypted after a PACK command and how to avoid it.
Additional Information:
When your program issues a PACK command, XBASE platforms, such as Visual FoxPro or xBase++, use the following procedure internally:

  1. USE original-file
  2. COPY TO temporary-file FOR .NOT. DELETED()
  3. DELETE original-file
  4. RENAME temporary-file TO original-file

In this process, original-file might become decrypted because PACK actually creates a new file. You can avoid this in a couple of different ways:

  • If you have created a profile using the GUI or CLI, make sure you have selected the “Encrypt new files” option.
  • Alternatively, turn on N_ENCODENEW before PACKing. E.g.,* turn on "encrypt new files" and save current setting
    nCurrent=N_ENCODENEW(1)
    PACK
    * restore original setting
    N_ENCODENEW(nCurrent)

 

Was this article helpful?

Related Articles

KB #240136: NetLib Key Management Service (nlcbtask) does not start but starts manually

Type: Workaround Summary: Encrypted databases may be inaccessible after reboot (listed as Suspect or Recovery…

KB #240061: SQL does not start – Error: Another version of the product is already installed

Type: Information Summary: When starting a Microsoft SQL Server instance that you have secured with…

KB #240005: Cannot Perform Case-Insensitive Compare on Encrypted Strings Using APIs

Type: Tip Summary: This article explains why you cannot do a case-insensitive compare on encrypted…

Still need help?

Our support team is here to assist you.

NetLib Security
AI Assistant · Online
Hi! I'm the NetLib Security assistant. I can answer questions about our encryption solutions, HIPAA compliance, Encryptionizer, and more. How can I help you today?