Calling advapi.dll using Pinvoke: CryptDecrypt and CryptEncrypt unexpected behaviour
问题 This is a follow up from this question. I am calling the WinAPI Cryptography functions from VB.net to ensure compatibility with a legacy product that shares the resulting data. The code functioned fine for many years however I have recently run into a problem when running on Windows Server 2012. After taking a look at various examples and the answer to my previous question I gave the code an overhaul, including changing what was previously a string variable to a Byte array, which I believe is