Older Hikvision devices use basic MD5 encryption. Newer firmware (post-2020) uses digest authentication or RSA encryption. If you are running an outdated version of iVMS-4200, it cannot negotiate the encryption method, and verification fails.
The specific error code "23" when using the HCNetSDK.dll suggests a particular issue, but without direct access to Hikvision's documentation or support resources, pinpointing the exact cause can be challenging. Error codes in DLLs are typically used to indicate specific problems or failures in the operations being performed.
Hikvision provides a dedicated SDK test tool (ask Hikvision support or find it in the SDK package). Run it: