public static Stream PemToStream(string pemStr) { MemoryStream memoryStream = new MemoryStream(Asn1Util.PemToBytes(pemStr)); memoryStream.Position = 0L; return((Stream)memoryStream); }
public static bool IsPemFormated(string pemStr) { byte[] bytes; try { bytes = Asn1Util.PemToBytes(pemStr); } catch { return(false); } return(bytes.Length > 0); }