copyangle's recent timeline updates
copyangle

copyangle

V2EX member #129431, joined on 2015-07-29 11:47:40 +08:00
copyangle's recent replies
搬油管视频照着这个课程做就行了,so easy! https://ke.sifou.com/course/1650000039343819
@nooper 饭端到你面前了还得喂你嘴里? 真是哪都有无脑喷子
Jul 31, 2015
Replied to a topic by copyangle Python 求个 转 python 的算法,原 java tea 加密算法
@zhantss 多谢,看来还是我基础不牢靠
环境搭好了直接跑程序就可以,php是一门写的再烂也能跑起来的强大语言。所以你这个“会”是指什么程度呢?

注:我原来写java的,当初改php用了一周时间就能干活了。
Jul 30, 2015
Replied to a topic by copyangle Python 求个 转 python 的算法,原 java tea 加密算法
@zhantss python里面怎么把string转换成byte数组?
Jul 29, 2015
Replied to a topic by copyangle 问与答 求个 java tea 加密转 python 的算法
主要是 encryptByTea 这一段不明白,求解
Jul 29, 2015
Replied to a topic by copyangle Python 求个 转 python 的算法,原 java tea 加密算法
主要是这一段不明白,求解

// 通过TEA算法加密信息
public String encryptByTea(String info) {
byte[] temp = info.getBytes();
int n = 8 - temp.length % 8; //若temp的位数不足8的倍数,需要填充的位数
byte[] encryptStr = new byte[temp.length + n];
encryptStr[0] = (byte) n;
System.arraycopy(temp, 0, encryptStr, n, temp.length);
byte[] result = new byte[encryptStr.length];
for (int offset = 0; offset < result.length; offset += 8) {
byte[] tempEncrpt = encrypt(encryptStr, offset, KEY, 32);
System.arraycopy(tempEncrpt, 0, result, offset, 8);
}
String tmp = encryptTwo(result);
// for (int i = 0; i < result.length; i++) {
// tmp = tmp + result[i] + this.separator;
// }
return tmp;
}
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5740 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 27ms · UTC 07:23 · PVG 15:23 · LAX 00:23 · JFK 03:23
♥ Do have faith in what you're doing.