示例#1
0
        public static Stream PemToStream(string pemStr)
        {
            MemoryStream memoryStream = new MemoryStream(Asn1Util.PemToBytes(pemStr));

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