← Back to Knowledge Base

KB #240020: APIs returning empty or invalid values when encrypting or decrypting (SQL Server)

⏱️ 2 min read
Type: Information
Summary:
This article discusses why you may see the APIs returning empty or invalid values and what to do about it.
Additional Information:
For example, fn_n_initkey or fn_n_setkey may return zero (0), or fn_n_encrypt may return the input value unchanged. In addition, the sample SQL scripts will have no affect and will appear to not encrypt any data. This is not accompanied by an error message.

The most likely cause for this is a missing DLL.

On x64 Operating Systems, confirm the following files exist:
C:Windowssystem32xp_sectools64.dll
C:WindowsSysWow64xp_sectools.dll

On x86 Operating Systems, confirm the following file exists:
C:Windowssystem32xp_sectools.dll

If xp_sectools.dll/xp_sectoold64.dll exist in the proper directories, the other most likely reason is an improper installation of Encryptionizer for SQL Server, e.g.,

  • You copied files instead of running Setup.
  • You failed to reboot after installing.

Try reinstalling Encryptionizer and rebooting.

TIP: You can use the Stored Procedure sp_n_ready, defined in add_sp.sql, to determine whether the APIs are present and active. E.g.,

declare @nResult Int
exec @nResult = sp_n_ready
if @nResult >= 0 -- APIs active and available
else -- APIs not available

 

Was this article helpful?

Related Articles

KB #240129: Encryptionizer may interfere with functioning of Imperva Agent

Type: Workaround Summary: When an instance of SQL Server is Secured with Encryptionizer it may…

KB #245163: Security Patch to Address Vulnerabilities (patch.5163d.2308.4.31155.17)

Type: Info Summary: We have released a patch for the NetLib Encryptionizer Platform to address…

KB #240126: NetLib Key Management Service in Start Pending status

Type: Fixed Affected Operating Systems: Windows Server 2016 and later, Windows 10 and later. Summary:…

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?