Пример #1
0
        /// <summary>
        /// Create PKCS 10 from hex string.
        /// </summary>
        /// <param name="data">Hex string.</param>
        /// <returns>PKCS 10</returns>
        public static GXPkcs10 FromHexString(string data)
        {
            GXPkcs10 cert = new GXPkcs10();

            cert.Init(GXCommon.HexToBytes(data));
            return(cert);
        }
Пример #2
0
        /// <summary>
        /// Create x509Certificate from DER Base64 encoded string.
        /// </summary>
        /// <param name="der">Base64 DER string.</param>
        /// <returns></returns>
        public static GXPkcs10 FromDer(string der)
        {
            der = der.Replace("\r\n", "");
            der = der.Replace("\n", "");
            GXPkcs10 cert = new GXPkcs10();

            cert.Init(GXCommon.FromBase64(der));
            return(cert);
        }