/// <summary>
        ///     Gets a license key from the specified file.
        /// </summary>
        internal static LicenseKey GetFromText(String keyText)
        {
            LicenseKey result = null;

            if (!String.IsNullOrEmpty(keyText))
            {
                // Reconstruct the content of the ASN.1 formatted PEM, excluding blank lines and comments
                String stringData = String.Join("", keyText.Split('\r', '\n').Where(line => !String.IsNullOrEmpty(line) && !line.Trim().StartsWith("--")));
                Byte[] binaryPem  = Convert.FromBase64String(stringData);
                if (binaryPem.Length != 0)
                {
                    // Extract the header from the PEM content
                    try
                    {
                        Byte[] asnBlock = LicenseKey.GetAsnData(0x30, ref binaryPem);
                        Byte[] oidBlock = LicenseKey.GetAsnData(0x30, ref asnBlock);
                        Byte[] oidValue = LicenseKey.GetAsnData(0x06, ref oidBlock);
                        if (oidValue.SequenceEqual(LicenseKey.RsaObjectIdentifier))
                        {
                            // Extract the RSA key from the PEM content
                            Byte[] rsaBlock = LicenseKey.GetAsnData(0x03, ref asnBlock);
                            Byte[] rsaValue = LicenseKey.GetAsnData(0x30, ref rsaBlock);

                            // Construct the RSA parameters
                            RSAParameters parameters = new RSAParameters();
                            parameters.Modulus  = LicenseKey.GetAsnData(0x02, ref rsaValue);
                            parameters.Exponent = LicenseKey.GetAsnData(0x02, ref rsaValue);
                            if (rsaValue.Length > 0)
                            {
                                parameters.D        = LicenseKey.GetAsnData(0x02, ref rsaValue);
                                parameters.P        = LicenseKey.GetAsnData(0x02, ref rsaValue);
                                parameters.Q        = LicenseKey.GetAsnData(0x02, ref rsaValue);
                                parameters.DP       = LicenseKey.GetAsnData(0x02, ref rsaValue);
                                parameters.DQ       = LicenseKey.GetAsnData(0x02, ref rsaValue);
                                parameters.InverseQ = LicenseKey.GetAsnData(0x02, ref rsaValue);
                            }

                            // Create the license key from the RSA
                            result = new LicenseKey(parameters);
                        }
                    }
                    catch
                    {
                    }
                }
            }
            return(result);
        }