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

  • <small id='ely8n'></small><noframes id='ely8n'>

    <legend id='ely8n'><style id='ely8n'><dir id='ely8n'><q id='ely8n'></q></dir></style></legend><tfoot id='ely8n'></tfoot>

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

      1. 點(diǎn)網(wǎng)中的Android應(yīng)用內(nèi)計(jì)費(fèi)驗(yàn)證收據(jù)(C#)

        Android in-app billing Verification of Receipt in Dot Net(C#)(點(diǎn)網(wǎng)中的Android應(yīng)用內(nèi)計(jì)費(fèi)驗(yàn)證收據(jù)(C#))
        • <bdo id='dOYhY'></bdo><ul id='dOYhY'></ul>
            <tbody id='dOYhY'></tbody>

          • <tfoot id='dOYhY'></tfoot>

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

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

                1. <legend id='dOYhY'><style id='dOYhY'><dir id='dOYhY'><q id='dOYhY'></q></dir></style></legend>
                  本文介紹了點(diǎn)網(wǎng)中的Android應(yīng)用內(nèi)計(jì)費(fèi)驗(yàn)證收據(jù)(C#)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我有一個(gè)提供應(yīng)用內(nèi)計(jì)費(fèi)的 Android 應(yīng)用程序,我們有我們的應(yīng)用程序服務(wù)器,android 應(yīng)用程序連接到該應(yīng)用程序服務(wù)器以向用戶提供服務(wù),在應(yīng)用程序內(nèi)購買時(shí),我們希望將收據(jù)推送到服務(wù)器以進(jìn)行驗(yàn)證過程.

                  I have a Android application which provides in-app billing and we have our application server to which android application connects to provide services to the user, on in-app purchase we want to push receipt to the server for verification process.

                  現(xiàn)在的問題是我不知道如何轉(zhuǎn)換 Security.java 文件在 dot net(C#) 中,因?yàn)槲覀兊姆?wù)器是用 dot net 編寫的

                  Now problem is I don't know how to convert Security.java file in dot net(C#) as our server is written in dot net

                  注意:此文件與提供消息簽名功能的 android 應(yīng)用內(nèi)計(jì)費(fèi)相同的應(yīng)用程序一起提供,我只需要它們在 dot net 中的等價(jià)物.

                  NOTE: This file comes with android in-app billing same application which provides message signing functions i just need their equivalent in dot net.

                  有關(guān)此問題的更多詳細(xì)信息,請(qǐng)?jiān)L問http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/66bb5683-fde6-47ca-92d7-de255cc8655a

                  More Detail regarding this problem is available at http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/66bb5683-fde6-47ca-92d7-de255cc8655a

                  推薦答案

                  我找到了解決方案,要實(shí)現(xiàn)你首先必須轉(zhuǎn)換公鑰格式,因?yàn)?dot net 使用排序不同的 Key 作為輸入.

                  I found the solution, to achieve you first have to convert the public key format as dot net uses sort of different Key as an input.

                  我不知道其他方法,但我們可以使用 java 代碼獲取點(diǎn)網(wǎng)格式密鑰,您只需運(yùn)行一次即可生成點(diǎn)網(wǎng)友好的 RSA 公鑰.(僅在給定公眾沒有快速變化時(shí)才建議這樣做,例如在 Android 市場應(yīng)用內(nèi)計(jì)費(fèi)的情況下)

                  I don't know the other ways but we can get dot net format key using a java Code which you have to run only once to generate the dot net friendly RSA Public Key. (this is only recommended when the given public do not changes rapidly e.g. in case of Android market in-app billing)

                  以下 Java 代碼對(duì)我有用

                  following Java Code worked for me

                  public static DotNetRSA GenerateDotNetKey(String base64PubKey)
                              throws IOException, NoSuchAlgorithmException,
                              InvalidKeySpecException {
                          /*
                           * String base64PubKey - 
                           * Is a Key retrieved from Google Checkout Merchant Account
                           */
                          BASE64Decoder decoder = new BASE64Decoder();
                  
                          byte[] publicKeyBytes = decoder.decodeBuffer(base64PubKey);
                  
                          EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(publicKeyBytes);
                          RSAPublicKey publicKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(publicKeySpec);
                  
                          byte[] modulusBytes = publicKey.getModulus().toByteArray();
                          byte[] exponentBytes = publicKey.getPublicExponent().toByteArray();
                  
                          modulusBytes = stripLeadingZeros(modulusBytes);
                  
                          BASE64Encoder encoder = new BASE64Encoder();
                          String modulusB64 = encoder.encode(modulusBytes);
                          String exponentB64 = encoder.encode(exponentBytes);
                  
                          return new DotNetRSA(modulusB64, exponentB64);
                      }
                  
                        private static byte[] stripLeadingZeros(byte[] a) {
                          int lastZero = -1;
                          for (int i = 0; i < a.length; i++) {
                            if (a[i] == 0) {
                              lastZero = i;
                            }
                            else {
                              break;
                            }
                          }
                          lastZero++;
                          byte[] result = new byte[a.length - lastZero];
                          System.arraycopy(a, lastZero, result, 0, result.length);
                          return result;
                        }
                  

                  現(xiàn)在要驗(yàn)證數(shù)字簽名,您可以在您的點(diǎn)網(wǎng)程序(c#)中使用以下代碼,前提是 GCHO_PUB_KEY_EXP 是您的指數(shù),GCHO_PUB_KEY_MOD 是您通過上述 Java 代碼提取的模數(shù)

                  Now to verify the Digital Signature you can use the following code in your dot net program(c#) provided GCHO_PUB_KEY_EXP is your Exponent and GCHO_PUB_KEY_MOD is your Modulus extracted by above Java Code

                  public static bool VerifyDataSingature(string data, string sign)
                  {
                       using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
                       {
                           RSAParameters rsaKeyInfo = new RSAParameters() 
                           { 
                               Exponent = Convert.FromBase64String(GCHO_PUB_KEY_EXP), 
                               Modulus = Convert.FromBase64String(GCHO_PUB_KEY_MOD) 
                           };
                           rsa.ImportParameters(rsaKeyInfo);
                  
                           return rsa.VerifyData(Encoding.ASCII.GetBytes(data), 
                                                 "SHA1", 
                                                 Convert.FromBase64String(sign));
                       }
                  }
                  

                  我希望它對(duì)每個(gè)人都適用,就像對(duì)我一樣.謝謝

                  I hope it will work for everyone as worked for me. Thanks

                  歸功于 Code Project Artical

                  這篇關(guān)于點(diǎn)網(wǎng)中的Android應(yīng)用內(nèi)計(jì)費(fèi)驗(yàn)證收據(jù)(C#)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時(shí)刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時(shí)突出顯示行)
                  Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)
                  Adding OnClick event to ASP.NET control(將 OnClick 事件添加到 ASP.NET 控件)
                  Multiple submit Button click problem?(多個(gè)提交按鈕點(diǎn)擊問題?)
                2. <i id='oH6GZ'><tr id='oH6GZ'><dt id='oH6GZ'><q id='oH6GZ'><span id='oH6GZ'><b id='oH6GZ'><form id='oH6GZ'><ins id='oH6GZ'></ins><ul id='oH6GZ'></ul><sub id='oH6GZ'></sub></form><legend id='oH6GZ'></legend><bdo id='oH6GZ'><pre id='oH6GZ'><center id='oH6GZ'></center></pre></bdo></b><th id='oH6GZ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oH6GZ'><tfoot id='oH6GZ'></tfoot><dl id='oH6GZ'><fieldset id='oH6GZ'></fieldset></dl></div>

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

                    <tbody id='oH6GZ'></tbody>

                  <tfoot id='oH6GZ'></tfoot>

                      • <bdo id='oH6GZ'></bdo><ul id='oH6GZ'></ul>

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

                            主站蜘蛛池模板: 久久五月婷 | 伊人色综合久久久天天蜜桃 | 国产精品国产精品国产专区不卡 | 韩日精品在线观看 | 国产午夜精品视频 | 人人人艹| 色资源在线 | 欧美午夜激情在线 | 国产成人精品亚洲日本在线观看 | 国产色 | 天天色av| 亚洲成人动漫在线观看 | 仙人掌旅馆在线观看 | 国产精品一区二区三区久久 | 日韩中文一区二区三区 | 欧美视频一区 | 欧美h版| 亚洲第一在线视频 | 欧美激情欧美激情在线五月 | 亚洲欧美视频一区 | 欧美 日韩 国产 成人 在线 | 91视频精选 | 免费午夜视频在线观看 | 亚洲国产激情 | 精品国产91| 岛国av一区二区三区 | 99久久精品一区二区毛片吞精 | 成人a视频片观看免费 | 中文字幕一区二区三区乱码在线 | 免费一区二区三区在线视频 | 日韩一区二区三区在线视频 | 亚洲国产精品一区在线观看 | 国产精品久久久久久久久久软件 | 最新高清无码专区 | 精品久久精品 | 国产精品99精品久久免费 | 亚洲精品国产第一综合99久久 | 亚洲狠狠丁香婷婷综合久久久 | 日韩欧美一区二区三区四区 | 亚洲国产精品视频一区 | 欧美αv|