CryptHashData

[DllImport("Crypt32.dll", SetLastError = true)]
public static extern bool CryptHashData(
   IntPtr hHash,
   byte[] pbData,
   uint dwDataLen,
   uint dwFlags
);

Microsoft documentation: Link

Last updated