// X.509からの変換
        #region X.509 鍵 → ECDsaProvider(Cngkey, ECParameters) → Jwk

        // X.509 は、NET47以降
#if NET45 || NET46
#else
        #region *.cer

        #region Jwk
        /// <summary>X509CerToJwk</summary>
        /// <param name="certificateFilePath">X.509鍵(*.cer)</param>
        /// <param name="settings">JsonSerializerSettings</param>
        /// <returns>Jwk公開鍵</returns>
        public static string X509CerToJwk(
            string certificateFilePath,
            JsonSerializerSettings settings = null)
        {
            return(EccPublicKeyConverter.ParamToJwk( // *.cer is PublicKey -> ExportParameters(false)
                       EccPublicKeyConverter.X509CerToProvider(certificateFilePath).ExportParameters(false), settings));
        }
 /// <summary>X509CerToJwk</summary>
 /// <param name="certificateFilePath">X.509鍵(*.pfx)</param>
 /// <param name="password">string</param>
 /// <param name="hashAlgorithmName">HashAlgorithmName</param>
 /// <param name="settings">JsonSerializerSettings</param>
 /// <returns>Jwk公開鍵</returns>
 public static string X509PfxToJwk(
     string certificateFilePath, string password,
     HashAlgorithmName hashAlgorithmName,
     JsonSerializerSettings settings = null)
 {
     return(EccPublicKeyConverter.ParamToJwk( // *.cer is PublicKey -> ExportParameters(false)
                EccPublicKeyConverter.X509PfxToProvider(certificateFilePath, password, hashAlgorithmName).ExportParameters(false), settings));
 }