public static bool CheckFileDigitalSignature(ReadOnlyMemory <byte> data, bool checkDriverSignature = false) { string tmpPath = Lfs.SaveToTempFile("dat", data); bool b1 = CheckFileDigitalSignature(tmpPath); bool b2 = true; if (checkDriverSignature) { b2 = IsKernelModeSignedFile(data.Span); } return(b1 && b2); }