You are viewing a single comment's thread from:RE: Secure the restoring of Passwd in SourceCode | 换位思考重构架构,从源码上保护密码安全 | JavaView the full contextshine.wong (53)in #cn • 7 years ago 辛苦你给我解释一堆,虽然我截屏了,本来准备今天好好看你帖子的,结果忙到现在,还有8页的东西(英语渣面对8页英文)等着我看明白了后修改~只能改天了~
没事慢慢来 :D
java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5"); byte[] array = md.digest(md5.getBytes());
这里是不是已经MD5了?
那下面这段我没理解~
for (int i = 0; i < array.length; ++i) { sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1,3)); }
因为要转成 String,所以比较复杂
既然是转成string,为什么要substring?我想知道下array 被赋值后的内容,你能随意输入个密码然后输入array的值给我看看帮助我理解下嘛?🧐