<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[W_han__的博客]]></title><description><![CDATA[学习总结应用]]></description><link>https://blog.csdn.net/W_han__</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; W_han__]]></copyright><item><title><![CDATA[【无标题】android 代码混淆 垃圾代码制造]]></title><link>https://blog.csdn.net/W_han__/article/details/128083623</link><guid>https://blog.csdn.net/W_han__/article/details/128083623</guid><author>W_han__</author><pubDate>Mon, 28 Nov 2022 17:21:07 +0800</pubDate><description><![CDATA[android 代码混淆 垃圾代码制造]]></description><category></category></item><item><title><![CDATA[Creator3.x 绘制六边形]]></title><link>https://blog.csdn.net/W_han__/article/details/127126324</link><guid>https://blog.csdn.net/W_han__/article/details/127126324</guid><author>W_han__</author><pubDate>Fri, 30 Sep 2022 17:00:47 +0800</pubDate><description><![CDATA[绘制六边形图形合集]]></description><category></category></item><item><title><![CDATA[CocosCreator3.x 手牌移动交换]]></title><link>https://blog.csdn.net/W_han__/article/details/127050841</link><guid>https://blog.csdn.net/W_han__/article/details/127050841</guid><author>W_han__</author><pubDate>Mon, 26 Sep 2022 11:42:38 +0800</pubDate><description><![CDATA[Creator3.x 手牌点击移动交换位置]]></description><category></category></item><item><title><![CDATA[Android 图片压缩的几种方法]]></title><link>https://blog.csdn.net/W_han__/article/details/126747697</link><guid>https://blog.csdn.net/W_han__/article/details/126747697</guid><author>W_han__</author><pubDate>Wed, 07 Sep 2022 15:56:00 +0800</pubDate><description><![CDATA[Android 图片压缩的几种方法]]></description><category></category></item><item><title><![CDATA[CocosCreator 调用安卓相册选择图片裁剪并传Base64到ts层]]></title><link>https://blog.csdn.net/W_han__/article/details/126747094</link><guid>https://blog.csdn.net/W_han__/article/details/126747094</guid><author>W_han__</author><pubDate>Wed, 07 Sep 2022 15:49:50 +0800</pubDate><description><![CDATA[CocosCreator 调用安卓相册选择图片裁剪并传Base64到ts层]]></description><category></category></item><item><title><![CDATA[node-js 异步处理图片，异步处理json文本]]></title><link>https://blog.csdn.net/W_han__/article/details/125739342</link><guid>https://blog.csdn.net/W_han__/article/details/125739342</guid><author>W_han__</author><pubDate>Tue, 12 Jul 2022 11:27:14 +0800</pubDate><description><![CDATA[node-js 异步处理图片，异步处理json文本]]></description><category></category></item><item><title><![CDATA[Creator 下载图片保存本地]]></title><link>https://blog.csdn.net/W_han__/article/details/123501199</link><guid>https://blog.csdn.net/W_han__/article/details/123501199</guid><author>W_han__</author><pubDate>Tue, 15 Mar 2022 14:04:02 +0800</pubDate><description><![CDATA[// 下载的头像地址，回调
test: function (url, callback) {
    console.log('remote test');
    var dirpath =  jsb.fileUtils.getWritablePath() + 'img/';
    var filepath = dirpath + 'picture' + '.png';
    console.log('remote filepath: ' + filepath);
    function load.]]></description><category></category></item><item><title><![CDATA[node-rsa-pem-from-modulus-exponent]]></title><link>https://blog.csdn.net/W_han__/article/details/122751268</link><guid>https://blog.csdn.net/W_han__/article/details/122751268</guid><author>W_han__</author><pubDate>Sun, 30 Jan 2022 11:15:49 +0800</pubDate><description><![CDATA[npm install rsa-pem-from-mod-exp


module.exports = rsaPublicKeyPem;

//http://stackoverflow.com/questions/18835132/xml-to-pem-in-node-js
function rsaPublicKeyPem(modulus_b64, exponent_b64) {
 
    var modulus = Buffer.from(modulus_b64, 'base64');
    var.]]></description><category></category></item><item><title><![CDATA[前端Node-rsa 对于部分java公钥加密数据无法解密]]></title><link>https://blog.csdn.net/W_han__/article/details/122739625</link><guid>https://blog.csdn.net/W_han__/article/details/122739625</guid><author>W_han__</author><pubDate>Sat, 29 Jan 2022 09:58:39 +0800</pubDate><description><![CDATA[如果java给前段的数据首位byte数字大于127的时候，Node-rsa中的 jsbn.js 文件对于首位字符串有特殊处理，然后将某一个bigInters数据类型做了更改，导致后面解密的时候出错。如下所示，首位大于127, this.s = -1, 和this数据里面的数据做更改。



一旦对数据做了更改，后面处理数据就肯定解密不出来了，因此，我将jsbn.js 0x80 改为0x100 ，问题就完美解决了






...]]></description><category></category></item><item><title><![CDATA[Uint8ArrayTostring、stringToUint8Array]]></title><link>https://blog.csdn.net/W_han__/article/details/122739557</link><guid>https://blog.csdn.net/W_han__/article/details/122739557</guid><author>W_han__</author><pubDate>Sat, 29 Jan 2022 09:43:05 +0800</pubDate><description><![CDATA[Uint8ArrayTostring. &amp;&amp; stringToUint8Array


public Uint8ArrayTostring(array: Uint8Array | null | undefined): string {
    var out, i, len, c;
    var char2, char3;
    let tempAry: Uint8Array = array as Uint8Array;
    out = "";
    len = tempA...]]></description><category></category></item><item><title><![CDATA[EncodeBase64、 DecodeBase64、Hex_to_Base64]]></title><link>https://blog.csdn.net/W_han__/article/details/122739474</link><guid>https://blog.csdn.net/W_han__/article/details/122739474</guid><author>W_han__</author><pubDate>Sat, 29 Jan 2022 09:40:48 +0800</pubDate><description><![CDATA[String To Base64
(utf格式调用this._utf8_encode
ascii格式string 将this._utf8_encode 注释掉)



public EncodeBase64(input: string) {
    var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    var output = "";
    var chr1, chr2, chr3, e]]></description><category></category></item><item><title><![CDATA[NodeRsa 从公钥中提取modulus 和 exponent]]></title><link>https://blog.csdn.net/W_han__/article/details/122735156</link><guid>https://blog.csdn.net/W_han__/article/details/122735156</guid><author>W_han__</author><pubDate>Fri, 28 Jan 2022 18:53:48 +0800</pubDate><description><![CDATA[首先使用nodeRsa库来处理。

从公钥中提取modulus 和 exponent。格式跟c#代码导出来的一样



let publicKey = 
'-----BEGIN PUBLIC KEY-----' + 
'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCF2sIZ8bqs4J8GpiB2feLaak7E' + 
'LZliFCFYnTwpETfryV5PJO6NnVAx0mOcNC7OjHjVDw8VthA/dMq6KWD4V05U9XGk' + 
'WniDW.]]></description><category></category></item><item><title><![CDATA[Node-rsa 使用公钥私钥加密解密]]></title><link>https://blog.csdn.net/W_han__/article/details/122735107</link><guid>https://blog.csdn.net/W_han__/article/details/122735107</guid><author>W_han__</author><pubDate>Fri, 28 Jan 2022 18:40:42 +0800</pubDate><description><![CDATA[Node-rsa 的加密解密格式模式是 pkcs1_oaep, 我使用的是pkcs1
java 端处理加密数据模式的格式是pkcs1 , 为了兼容能够和java 服务器的格式相对应，建议使用pkcs1


let privateKey = 
"-----BEGIN PRIVATE KEY-----" + 
'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAIXawhnxuqzgnwam' + 
'IHZ94tpqTsQtmWIUIVidPCkRN+vJXk.]]></description><category></category></item><item><title><![CDATA[node-rsa 密钥对生成]]></title><link>https://blog.csdn.net/W_han__/article/details/122734908</link><guid>https://blog.csdn.net/W_han__/article/details/122734908</guid><author>W_han__</author><pubDate>Fri, 28 Jan 2022 18:20:21 +0800</pubDate><description><![CDATA[第一方案为
window.crypto.subtle.generateKey

但是某些情况下，在http链接无法获取 window.crypto.subtle对象，只能在https请求和localHost的时候能够获取到window.crypto.subtle对象。
为了解决任何时候都能生成密钥对，因此我选择了node-rsa来生成。

第二方案：使用node-rsa 库。
使用：


public static CreateAesAPair(func: Function) {
       try {.]]></description><category></category></item><item><title><![CDATA[js 长整形 bigInt]]></title><link>https://blog.csdn.net/W_han__/article/details/122238558</link><guid>https://blog.csdn.net/W_han__/article/details/122238558</guid><author>W_han__</author><pubDate>Thu, 30 Dec 2021 15:40:54 +0800</pubDate><description><![CDATA[0x01 &lt;&lt; 40 &amp; 4312284604121343 
为0

(BigInt(0x01) &lt;&lt; BigInt(position) &amp; BigInt(showFlags)
为1

js 位运算超过最大整数问题, 使用BigInt 大整数
]]></description><category></category></item><item><title><![CDATA[JavaScrip AES 生成密钥对]]></title><link>https://blog.csdn.net/W_han__/article/details/121807047</link><guid>https://blog.csdn.net/W_han__/article/details/121807047</guid><author>W_han__</author><pubDate>Thu, 09 Dec 2021 10:00:00 +0800</pubDate><description><![CDATA[AES密钥对]]></description><category></category></item><item><title><![CDATA[com.google.common.base.Preconditions]]></title><link>https://blog.csdn.net/W_han__/article/details/121058076</link><guid>https://blog.csdn.net/W_han__/article/details/121058076</guid><author>W_han__</author><pubDate>Sat, 30 Oct 2021 22:50:10 +0800</pubDate><description><![CDATA[上面这个错误事NDK 路径的问题
ndk.dir=/Users/mac/Library/Android/sdk/ndk/

ndk 路径之前没有加19.2.5345600， 具体哪一个，所以报错了

ndk.dir=/Users/mac/Library/Android/sdk/ndk/19.2.5345600

这样就能编译过去了
]]></description><category></category></item><item><title><![CDATA[字符串替换]]></title><link>https://blog.csdn.net/W_han__/article/details/121028036</link><guid>https://blog.csdn.net/W_han__/article/details/121028036</guid><author>W_han__</author><pubDate>Fri, 29 Oct 2021 09:25:54 +0800</pubDate><description><![CDATA[/**
     * 通过 key获取对应的显示文字
     * @param key 
     * @param args 替换参数
     */
    public static getText(key: string, ...args: any): string {
        var str = this.textMap[key];
        if (!str) {
            str = 'Text not found,the key is:' + key;...]]></description><category></category></item><item><title><![CDATA[CocosCreator 3.x和2.x 区别(更新中...)]]></title><link>https://blog.csdn.net/W_han__/article/details/120969263</link><guid>https://blog.csdn.net/W_han__/article/details/120969263</guid><author>W_han__</author><pubDate>Tue, 26 Oct 2021 11:54:09 +0800</pubDate><description><![CDATA[2D部分：

1. 2.x版本的cc.xxx 去掉了cc.比如cc.Node在3.x 中写Node。在代码最上面引入cc 命名空间
import { _decorator, Component, Node, xxx} from 'cc';
2. Node 中不存在 设置大小和 改变锚点的属性。使用新的component (cc.UITransform)。
    Node.getComponent(UITransform).getContentSize|setContentSize...]]></description><category></category></item><item><title><![CDATA[Json2Excel.py3]]></title><link>https://blog.csdn.net/W_han__/article/details/116133992</link><guid>https://blog.csdn.net/W_han__/article/details/116133992</guid><author>W_han__</author><pubDate>Sun, 25 Apr 2021 17:22:31 +0800</pubDate><description><![CDATA[#!/usr/bin/env python
# -*- coding: utf-8 -*-

import json
import os
import sys
import xlwt
import xlrd
from xlutils.copy import copy

def write_excel(dicts, excelname):
    print("-------------", excelname)
    excelpath = os.path.join(os.getcwd(), excel.]]></description><category></category></item></channel></rss>