For advanced users writing their own generator, here is the logic behind the algorithm (as of firmware 5.8.2):
Connect your computer to the as your Hikvision device. Run the SADP Tool as an administrator. 2. Exporting the XML Request File hikvision xml key generator new