/// <summary>
        /// Instantiates a CertData object from a certificate.
        /// </summary>
        /// <param storeName="storeLocation">The store storeLocation.</param>
        /// <param storeName="storeName">Name of the store.</param>
        /// <param storeName="certificate">The certificate.</param>
        /// <param storeName="computeKeyIdentifiersImmediately">if set to <see langword="true"/>, it computes the key identifier values immediately.</param>
        /// <param storeName="computePrivateKeyDataImmediately">if set to <see langword="true"/>, it computes the data related to the private key data immediately.</param>
        /// <returns></returns>
        internal static CertData FromCert(
            StoreLocation storeLocation, string storeName,
            X509Certificate2 certificate,
            bool computeKeyIdentifiersImmediately,
            bool computePrivateKeyDataImmediately)
        {
            CertData certData = new CertData();

            certData.FillCheapCertData(storeLocation, storeName, certificate);

            if (computeKeyIdentifiersImmediately)
            {
                certData.FillKeyIndentifierCertData(certificate);
            }
            if (computePrivateKeyDataImmediately)
            {
                certData.FillPrivKeyCertData(certificate);
            }

            return(certData);
        }