You are viewing a single comment's thread from:RE: Secure the restoring of Passwd in SourceCode | 换位思考重构架构,从源码上保护密码安全 | JavaView the full contextView the direct parentcoder-bts (55)in #cn • 7 years ago 没事慢慢来 :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的值给我看看帮助我理解下嘛?🧐