Invalid encryption method
A -2023 error most likely means that the license file or certificate that the library is attempting to access is corrupt.
Solution
If a machine (virtual or physical) is powered down or crashes while the library happens to be writing to the license, the license can become corrupt. To safely shutdown the library you must call NalpLibClose(), and wait for the function to complete.
Unless you are using consumption tokens, it is always safe to delete the license file, and let the library re-create the file during app startup when the license is refreshed with a call to NSLGetLicense(). If there were remaining consumption tokens, the license file can still be deleted, but the remaining tokens will be lost.