I am trying to generate App Locker rules programmatically.As MSDN described it uses SHA2 Authenticode.
I have tried using SHA256 Class from this answer but it only generates SHA256 and not Authenticode.
For example Notepad++.exe
SHA256 - 02f2cee4118a8f8d732d736e1758a38abdceea6470ba63ea224ae56b27e4983c
SRPv2 data (AppLocker) - cd068ebc869a1c7dee0ea1d5e19e89d0cacb8af385d44b0f3a57b5aefcf3c051
Edit: With a little more research, I found that Windows AppLocker expects PE256 hash.