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

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

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

    1. <tfoot id='BYBXh'></tfoot>
    2. <i id='BYBXh'><tr id='BYBXh'><dt id='BYBXh'><q id='BYBXh'><span id='BYBXh'><b id='BYBXh'><form id='BYBXh'><ins id='BYBXh'></ins><ul id='BYBXh'></ul><sub id='BYBXh'></sub></form><legend id='BYBXh'></legend><bdo id='BYBXh'><pre id='BYBXh'><center id='BYBXh'></center></pre></bdo></b><th id='BYBXh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BYBXh'><tfoot id='BYBXh'></tfoot><dl id='BYBXh'><fieldset id='BYBXh'></fieldset></dl></div>
      <legend id='BYBXh'><style id='BYBXh'><dir id='BYBXh'><q id='BYBXh'></q></dir></style></legend>
      1. 在 Coldfusion 中加密并在 C# 中解密

        Encrypt in Coldfusion and decrypt in C#(在 Coldfusion 中加密并在 C# 中解密)

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

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

            <tfoot id='MCw5k'></tfoot>

              <legend id='MCw5k'><style id='MCw5k'><dir id='MCw5k'><q id='MCw5k'></q></dir></style></legend>
                1. 本文介紹了在 Coldfusion 中加密并在 C# 中解密的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  這里是coldfusion中用來加密的代碼

                  Here is the code used to encrypt in coldfusion

                  <cfset strBase64Value = encrypt(strValue,24 character key,AES) />
                  

                  它正在生成像 714FEA9A9A2184769CA49D5133F08580 這樣的加密值,考慮到它只是大寫和數字,這對我來說似乎很奇怪.

                  It is generating encrypted values like 714FEA9A9A2184769CA49D5133F08580 which seems odd to me considering it is only uppercase and numbers.

                  我應該使用什么 C# 庫來正確解密它?

                  What C# library should I use to properly decrypt it ?

                  同時查看此信息,貌似默認使用UUEncode算法進行編碼.

                  Also looking at this information, it seems that by default it uses the UUEncode algorithm to encode.

                  我應該要求加密器使用 Base64 作為編碼參數嗎?

                  Should I ask the encrypter to use Base64 as encoding parameter ?

                  推薦答案

                  它正在生成像 714FEA9A9A2184769CA49D5133F08580

                  然后他們使用Hex",而不是默認的UUEncode".hex"或base64"都可以.只要你們都同意編碼,這并不重要.

                  Then they are using "Hex", not the default "UUEncode". Either "hex" or "base64" is fine. As long as you both agree upon the encoding, it does not really matter.

                  您可以使用 RijndaelManaged 來解密字符串.但是,ColdFusion 和 C# 的默認加密設置略有不同.使用加密功能:

                  You can use RijndaelManaged to decrypt the strings. However, the default encryption settings for ColdFusion and C# differ slightly. With the encrypt function:

                  • AES"是AES/ECB/PKCS5Padding"的縮寫
                  • ECB"模式不使用 IV
                  • 密鑰字符串始終采用 base64 編碼

                  注意: 盡管名稱不同,但對于 SUN 提供程序,PKCS5Padding (CF/Java) 對應于 PaddingMode.PKCS7 (C#).如本帖所述,"... Java 中的 SUN 提供程序指示 [s] PKCS#5 應該在哪里使用 PKCS#7 - "PKCS5Padding" 應該是 "PKCS7Padding".這是從只有 8 字節塊密碼的時候的遺產例如(三重)DES 對稱密碼可用."

                  NB: Despite the name difference, for the SUN provider, PKCS5Padding (CF/Java) corresponds to PaddingMode.PKCS7 (C#). As mentioned in this thread, the "... SUN provider in Java indicate[s] PKCS#5 where PKCS#7 should be used - "PKCS5Padding" should have been "PKCS7Padding". This is a legacy from the time that only 8 byte block ciphers such as (triple) DES symmetric cipher were available."

                  因此,您需要確保調整 C# 設置以匹配.考慮到這一點,只需解碼加密文本 來自 hex 和來自 base64 的密鑰字符串.使用 有點難看API 中的示例,只需調整算法設置以匹配 encrypt() 函數使用的設置:

                  So you need to ensure your C# settings are adjusted to match. With that in mind, just decode the encrypted text from hex and the key string from base64. Using the slightly ugly example in the API, just adjust the algorithm settings to match those used by the encrypt() function:

                  使用 ColdFusion 加密

                  <cfscript>
                      plainText     = "Nothing to see";
                      // 128 bit key base64 encoded
                      keyInBase64   = "Y25Aju8H2P5DR8mY6B0ezg==";
                      // "AES" is short for "AES/ECB/PKCS5Padding"
                      encryptedText = encrypt(plainText, keyInBase64, "AES", "hex");
                      WriteDump( encryptedText );
                      // result: 8889EDF02F181158AAD902AB86C63951 
                  </cfscript>
                  

                  用 C# 解密

                  byte[] bytes = SomeMethodToConvertHexToBytes( encryptedText );
                  byte[] key = Convert.FromBase64String( keyInBase64 );
                  
                  string decryptedText = null;
                  
                  using (RijndaelManaged algorithm = new RijndaelManaged())
                  {
                  
                      // initialize settings to match those used by CF
                      algorithm.Mode = CipherMode.ECB;
                      algorithm.Padding = PaddingMode.PKCS7;
                      algorithm.BlockSize = 128;
                      algorithm.KeySize = 128;
                      algorithm.Key = key;
                  
                      ICryptoTransform decryptor = algorithm.CreateDecryptor();
                  
                      using (MemoryStream msDecrypt = new MemoryStream(bytes))
                      {
                          using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
                          {
                             using (StreamReader srDecrypt = new StreamReader(csDecrypt))
                             {
                  
                                 decryptedText = srDecrypt.ReadToEnd();
                             }
                          }
                      }
                  }
                  
                  Console.WriteLine("Encrypted String: {0}", encryptedText);
                  Console.WriteLine("Decrypted String: {0}", decryptedText);
                  

                  請記住,您可以(并且可能應該)調整設置,例如使用更安全的 CBC 模式 而不是 ECB.您只需要與 CF 開發人員協調這些更改.

                  Keep in mind you can (and probably should) adjust the settings, such as using the more secure CBC mode instead of ECB. You just need to coordinate those changes with the CF developer.

                  這篇關于在 Coldfusion 中加密并在 C# 中解密的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                2. <tfoot id='Bt2HT'></tfoot>

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

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

                            主站蜘蛛池模板: 国产精品久久久久婷婷二区次 | 亚洲va欧美va人人爽午夜 | av在线播放国产 | 91精品一区二区三区久久久久 | 在线播放一区二区三区 | 久久国产精品-久久精品 | 精品一二区 | 91 在线| 色综合久 | 中文字幕视频在线免费 | 久草资源| 国产精品中文字幕在线 | 国产激情免费视频 | 欧美日韩国产综合在线 | 久久99精品久久久久久秒播九色 | 国产精品日韩在线 | 久久久久久久久99 | 国产高潮av | 一区二区三区免费看 | 日韩电影免费在线观看中文字幕 | 国产精品国产三级国产aⅴ中文 | 欧美在线观看一区二区 | 日韩精品一区二区久久 | 欧美精品在线一区二区三区 | 一区二区三区高清在线观看 | 精品国产欧美一区二区三区成人 | 成人免费一区二区三区视频网站 | 久久久久久国模大尺度人体 | 在线播放国产一区二区三区 | 日韩h | 国产高清免费 | 久久久成人精品 | 亚洲高清免费 | 国产黄色电影 | av在线天堂 | 日韩国产在线 | 久久精品99国产精品 | 精品一区二区视频 | 国产高清在线视频 | 日韩三级在线观看 | 免费的日批视频 |