久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='j0apR'><style id='j0apR'><dir id='j0apR'><q id='j0apR'></q></dir></style></legend>

<tfoot id='j0apR'></tfoot>

    <i id='j0apR'><tr id='j0apR'><dt id='j0apR'><q id='j0apR'><span id='j0apR'><b id='j0apR'><form id='j0apR'><ins id='j0apR'></ins><ul id='j0apR'></ul><sub id='j0apR'></sub></form><legend id='j0apR'></legend><bdo id='j0apR'><pre id='j0apR'><center id='j0apR'></center></pre></bdo></b><th id='j0apR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='j0apR'><tfoot id='j0apR'></tfoot><dl id='j0apR'><fieldset id='j0apR'></fieldset></dl></div>
    • <bdo id='j0apR'></bdo><ul id='j0apR'></ul>

    <small id='j0apR'></small><noframes id='j0apR'>

    1. 如何將公鑰存儲在機器級 RSA 密鑰容器中

      How to store a public key in a machine-level RSA key container(如何將公鑰存儲在機器級 RSA 密鑰容器中)
        <bdo id='elKcq'></bdo><ul id='elKcq'></ul>
            <tbody id='elKcq'></tbody>

          <small id='elKcq'></small><noframes id='elKcq'>

          1. <tfoot id='elKcq'></tfoot>
            <i id='elKcq'><tr id='elKcq'><dt id='elKcq'><q id='elKcq'><span id='elKcq'><b id='elKcq'><form id='elKcq'><ins id='elKcq'></ins><ul id='elKcq'></ul><sub id='elKcq'></sub></form><legend id='elKcq'></legend><bdo id='elKcq'><pre id='elKcq'><center id='elKcq'></center></pre></bdo></b><th id='elKcq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='elKcq'><tfoot id='elKcq'></tfoot><dl id='elKcq'><fieldset id='elKcq'></fieldset></dl></div>

            1. <legend id='elKcq'><style id='elKcq'><dir id='elKcq'><q id='elKcq'></q></dir></style></legend>
              • 本文介紹了如何將公鑰存儲在機器級 RSA 密鑰容器中的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                在僅存儲公鑰/私鑰對的公鑰時,我在使用機器級 RSA 密鑰容器時遇到了問題.

                I'm having a problem using a machine level RSA key container when storing only the public key of a public/private key pair.

                以下代碼創建一個公/私對并從該對中提取公鑰.該對和公鑰存儲在單獨的密鑰容器中.然后從這些密鑰容器中獲取密鑰,此時它們應該與進入容器的密鑰相同.

                The following code creates a public/private pair and extracts the public key from that pair. The pair and the public key are stored in separate key containers. The keys are then obtained from those key containers at which point they should be the same as the keys going into the containers.

                當為 CspParameters.Flags 指定 CspProviderFlags.UseDefaultKeyContainer(即從 PublicKey 容器中讀出的鍵是相同),但是當為 CspParameters.Flags 指定 CspProviderFlags.UseMachineKeyStore 時,從 PublicKey 讀回的密鑰是不同的.

                The code works when CspProviderFlags.UseDefaultKeyContainer is specified for CspParameters.Flags (i.e. the key read back out from the PublicKey container is the same), but when CspProviderFlags.UseMachineKeyStore is specified for CspParameters.Flags the key read back from PublicKey is different.

                為什么行為不同,我需要做些什么不同的事情來從機器級 RSA 密鑰容器中檢索公鑰?

                Why is the behaviour different, and what do I need to do differently to retrieve the public key from a machine-level RSA key container?

                var publicPrivateRsa = new RSACryptoServiceProvider(new CspParameters()
                {
                    KeyContainerName = "PublicPrivateKey",
                    Flags = CspProviderFlags.UseMachineKeyStore
                    //Flags = CspProviderFlags.UseDefaultKeyContainer
                }
                    )
                {
                    PersistKeyInCsp = true,
                
                };
                
                var publicRsa = new RSACryptoServiceProvider(new CspParameters()
                {
                    KeyContainerName = "PublicKey",
                    Flags = CspProviderFlags.UseMachineKeyStore
                    //Flags = CspProviderFlags.UseDefaultKeyContainer
                }
                    )
                {
                    PersistKeyInCsp = true
                };
                
                
                //Export the key.
                publicRsa.ImportParameters(publicPrivateRsa.ExportParameters(false));
                
                
                Console.WriteLine(publicRsa.ToXmlString(false));
                Console.WriteLine(publicPrivateRsa.ToXmlString(false));
                
                //Dispose those two CSPs.
                using (publicRsa)
                {
                    publicRsa.Clear();
                }
                using (publicPrivateRsa)
                {
                    publicRsa.Clear();
                }
                
                publicPrivateRsa = new RSACryptoServiceProvider(new CspParameters()
                {
                    KeyContainerName = "PublicPrivateKey",
                    Flags = CspProviderFlags.UseMachineKeyStore
                    //Flags = CspProviderFlags.UseDefaultKeyContainer
                }
                    );
                
                
                publicRsa = new RSACryptoServiceProvider(new CspParameters()
                {
                    KeyContainerName = "PublicKey",
                    Flags = CspProviderFlags.UseMachineKeyStore
                    //Flags = CspProviderFlags.UseDefaultKeyContainer
                }
                    );
                
                Console.WriteLine(publicRsa.ToXmlString(false));
                Console.WriteLine(publicPrivateRsa.ToXmlString(false));
                
                
                using (publicRsa)
                {
                    publicRsa.Clear();
                }
                using (publicPrivateRsa)
                {
                    publicRsa.Clear();
                }
                

                推薦答案

                似乎密鑰容器并非用于此目的(這在 .NET Framework 中的如何:在密鑰容器中存儲非對稱密鑰"中暗示了這一點開發人員指南,并由 a 確認MSDN 上的討論).

                It seems that key containers are not intended for this purpose (this is implied by "How to: Store Asymmetric Keys in a Key Container" from the .NET Framework Developer's Guide, and confirmed by a disccusion on MSDN).

                需要使用其他機制,例如將密鑰存儲在 XML 文件中來實現此目標.

                Other mechanisms, such as storing the key in an XML file, need to be used to achieve this goal.

                這篇關于如何將公鑰存儲在機器級 RSA 密鑰容器中的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數調用按鈕 OnClick)

                • <tfoot id='BSANF'></tfoot>
                  <legend id='BSANF'><style id='BSANF'><dir id='BSANF'><q id='BSANF'></q></dir></style></legend>
                • <i id='BSANF'><tr id='BSANF'><dt id='BSANF'><q id='BSANF'><span id='BSANF'><b id='BSANF'><form id='BSANF'><ins id='BSANF'></ins><ul id='BSANF'></ul><sub id='BSANF'></sub></form><legend id='BSANF'></legend><bdo id='BSANF'><pre id='BSANF'><center id='BSANF'></center></pre></bdo></b><th id='BSANF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BSANF'><tfoot id='BSANF'></tfoot><dl id='BSANF'><fieldset id='BSANF'></fieldset></dl></div>

                  <small id='BSANF'></small><noframes id='BSANF'>

                        <tbody id='BSANF'></tbody>

                        • <bdo id='BSANF'></bdo><ul id='BSANF'></ul>
                          主站蜘蛛池模板: 国产精品美女久久久 | 好婷婷网| 久久久久国产一级毛片高清网站 | 国产不卡一区 | 久久久久九九九九 | 欧美一区在线看 | 成人国产午夜在线观看 | 91精品成人久久 | 91中文字幕在线观看 | 久久久高清| 懂色tv | 97在线观看 | 亚洲一页| 国产欧美在线 | 国产精品视频久久久久 | 亚洲综合视频 | 欧美精品91| 婷婷丁香在线视频 | 欧美国产日韩在线观看 | 欧美成人综合 | 欧美亚洲一区二区三区 | 国产日韩欧美精品一区二区 | 国产一区二区 | 一区二区三区国产视频 | 日韩三级在线 | 国产精品久久免费观看 | 国产一区二区不卡 | 亚洲精品高清视频在线观看 | 欧美一级特黄aaa大片在线观看 | 少妇精品亚洲一区二区成人 | 国产欧美一区二区三区国产幕精品 | 久久亚洲欧美日韩精品专区 | 亚洲精品一级 | 精品视频在线免费观看 | 免费观看一区二区三区毛片 | 国产精品美女久久久久久久久久久 | 超级乱淫av片免费播放 | 久久天天| 国产伦精品一区二区三区照片91 | 国产九九九 | 日本超碰|