博文

目前显示的是 八月, 2021的博文

base64 in Nodejs and Java

From :  https://www.hacksparrow.com/nodejs/base64-encoding-decoding-in-node-js.html let secretBase64 = Buffer.from(“ JavaScript ”).toString('base64'); // SmF2YVNjcmlwdA== var b = new Buffer('JavaScript'); // Buffer var s = b.toString('base64'); // SmF2YVNjcmlwdA== var b = new Buffer('SmF2YVNjcmlwdA==', 'base64') var s = b.toString(); // JavaScript // ------------------- var b = new Buffer('SmF2YVNjcmlwdA==', 'base64') var s = b.toString('hex'); // 4a617661536372697074 var b = new Buffer('4a617661536372697074', 'hex') var s = b.toString('utf8'); // JavaScript //---------------------- $node >require('crypto').randomBytes(64).toString('hex') f3a302c14cd2f57bc6972a0d599857dbde877fbf03b38dd592b9635bc7f30299c9d5dfe44e5abb615737cf40a45958c8283b5d1132c4e7e0d8e66610044be1f4 https://expressjs.com/en/api.html var fs = require('fs' ); // function to encode file data to base64 enc...

Log: update System.Net.Http.dll

Update System.Net.Http.dll We need to modify three files, packages.config, Web.config, App.conf, then copy System.Net.Http.dll into the folder bin. 1.packages.config C:\Users\JinTb\Documents\tb\new-net-api\src\TbApi45\TBWebService\packages.config <package id="System.Net.Http" version="4.3.4" targetFramework="net461" /> D:\jin\net-api\src\Api45\twWebService\packages.config <package id="System.Net.Http" version="4.3.3" targetFramework="net461" /> ------------------------------ 2.Web.config <dependentAssembly>         <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />         <bindingRedirect oldVersion="0.0.0.0-4.1.1.2" newVersion="4.1.1.2" />       </dependentAssembly> <dependentAssembly>         <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" ...