public static string GetPemFileHeader(string fileName) { try { FileStream fileStream = new FileStream(fileName, FileMode.Open); byte[] numArray = new byte[fileStream.Length]; fileStream.Read(numArray, 0, numArray.Length); fileStream.Close(); return(Asn1Util.GetPemHeader(Asn1Util.BytesToString(numArray))); } catch { return(""); } }