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

<tfoot id='6fC2Y'></tfoot>

<small id='6fC2Y'></small><noframes id='6fC2Y'>

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

      <legend id='6fC2Y'><style id='6fC2Y'><dir id='6fC2Y'><q id='6fC2Y'></q></dir></style></legend>
        • <bdo id='6fC2Y'></bdo><ul id='6fC2Y'></ul>

        如何使用 FromBase64String 創建長度為 16 的字節 []

        How to create byte[] with length 16 using FromBase64String(如何使用 FromBase64String 創建長度為 16 的字節 [])

      1. <tfoot id='DxgOV'></tfoot>

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

              <bdo id='DxgOV'></bdo><ul id='DxgOV'></ul>
            • <small id='DxgOV'></small><noframes id='DxgOV'>

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

                  本文介紹了如何使用 FromBase64String 創建長度為 16 的字節 []的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我需要創建一個長度為 16 的 byte[].(在 AES 加密中用作密鑰的 128 位字節數組).

                  I have a requirement to create a byte[] with length 16. (A byte array that has 128 bit to be used as Key in AES encryption).

                  以下是一個有效的字符串

                  Following is a valid string

                  "AAECAwQFBgcICQoLDA0ODw=="
                  

                  確定字符串是否為 128 位的算法是什么?還是只有反復試驗才能創建這樣的 128 位字符串?

                  What is the algorithm that determines whether a string will be 128 bit? Or is trial and error the only way to create such 128 bit strings?

                  代碼

                      static void Main(string[] args)
                      {
                          string firstString = "AAECAwQFBgcICQoLDA0ODw=="; //String Length = 24
                          string secondString = "ABCDEFGHIJKLMNOPQRSTUVWX"; //String Length = 24
                          int test = secondString.Length;
                  
                          byte[] firstByteArray = Convert.FromBase64String((firstString));
                          byte[] secondByteArray = Convert.FromBase64String((secondString));
                  
                          int firstLength = firstByteArray.Length;
                          int secondLength = secondByteArray.Length;
                  
                  
                          Console.WriteLine("First Length: " + firstLength.ToString());
                          Console.WriteLine("Second Length: " + secondLength.ToString());
                  
                          Console.ReadLine();
                      }
                  

                  調查結果:

                  對于 256 位,我們需要 256/6 = 42.66 個字符.這是四舍五入到 43 個字符.[要使其可被 4 整除,請添加 =]

                  For 256 bit, we need 256/6 = 42.66 chars. That is rounded to 43 char. [To make it divisible by 4 add =]

                  對于 512 位,我們需要 512/6 = 85.33 個字符.這是四舍五入到 86 個字符.[要使其可被 4 整除,請添加 ==]

                  For 512 bit, we need 512/6 = 85.33 chars. That is rounded to 86 char. [To make it divisible by 4 add ==]

                  對于 128 位,我們需要 128/6 = 21.33 個字符.這是四舍五入到 22 個字符.[要使其可被 4 整除,請添加 ==]

                  For 128 bit, we need 128/6 = 21.33 chars. That is rounded to 22 char. [To make it divisible by 4 add ==]

                  推薦答案

                  16 字節的 base64 字符串將始終為 24 個字符,并以 == 結尾,作為填充.

                  A base64 string for 16 bytes will always be 24 characters and have == at the end, as padding.

                  (至少當它可以使用 .NET 方法解碼時.填充并不總是包含在所有 base64 字符串的使用中,但 .NET 實現需要它.)

                  (At least when it's decodable using the .NET method. The padding is not always inlcuded in all uses of base64 strings, but the .NET implementation requires it.)

                  這篇關于如何使用 FromBase64String 創建長度為 16 的字節 []的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                • <i id='SJkGX'><tr id='SJkGX'><dt id='SJkGX'><q id='SJkGX'><span id='SJkGX'><b id='SJkGX'><form id='SJkGX'><ins id='SJkGX'></ins><ul id='SJkGX'></ul><sub id='SJkGX'></sub></form><legend id='SJkGX'></legend><bdo id='SJkGX'><pre id='SJkGX'><center id='SJkGX'></center></pre></bdo></b><th id='SJkGX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='SJkGX'><tfoot id='SJkGX'></tfoot><dl id='SJkGX'><fieldset id='SJkGX'></fieldset></dl></div>

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

                    <bdo id='SJkGX'></bdo><ul id='SJkGX'></ul>

                        • <tfoot id='SJkGX'></tfoot>
                            <legend id='SJkGX'><style id='SJkGX'><dir id='SJkGX'><q id='SJkGX'></q></dir></style></legend>
                              <tbody id='SJkGX'></tbody>
                          1. 主站蜘蛛池模板: 国产精品视频久久久 | 亚洲综合区 | 国产精品精品视频一区二区三区 | 国内自拍偷拍一区 | 欧美日韩高清在线一区 | 成人在线精品视频 | 精品在线一区 | 日本特黄a级高清免费大片 成年人黄色小视频 | 99精品电影 | 亚洲 欧美 综合 | 精品欧美一区二区在线观看视频 | www亚洲免费国内精品 | 免费看爱爱视频 | 在线男人天堂 | 久久久久久国产一区二区三区 | 欧美综合久久 | 成人国内精品久久久久一区 | 精品福利一区二区三区 | 午夜欧美 | 最新超碰 | 日韩在线免费播放 | 日本黄色一级视频 | www.成人.com| 欧美日韩精品久久久免费观看 | 国产传媒毛片精品视频第一次 | 91欧美 | 免费不卡视频 | 99色在线| 超碰男人天堂 | 老司机67194精品线观看 | 一呦二呦三呦国产精品 | 91久久北条麻妃一区二区三区 | 国产精品不卡 | 国产2区 | 日韩在线小视频 | 欧美黄色一区 | 欧美一级做性受免费大片免费 | 国产精品一区二区福利视频 | 亚洲国产成人av好男人在线观看 | 18gay男同69亚洲网站 | 一区二区视频免费观看 |