is it possible to decrypt data which was encrypted with MS DPAPI? For example i want to decrypt a digital certificate from the windows registry.
byte[] byteArray = (byte[]) Advapi32Util.registryGetValue(WinReg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\SystemCertificates\\AuthRoot\\Certificates\\02FAF3E291435468607857694DF5E45B68851868", "Blob");
byte[] decrypted = Crypt32Util.cryptUnprotectData(byteArray);
String stringDecrypted = new String(decrypted);
System.out.println(stringDecrypted);
But i get an Win32 Exception: Exception in thread "main" com.sun.jna.platform.win32.Win32Exception: Data are invalid.
I don't found any information about this Exception. So what das this mean?? And could i decrypt these files like i want it or is it not possible?
Thnaks for help!