Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能转换这个
11252411445171911438526
变成这样!
c6ee47d1a8edbce28b1560b836abd388631983b6
有人帮忙吗?
如果你想要一个 SHA1 哈希,你可以这样做:
String input = "11252411445171911438526"; MessageDigest md = MessageDigest.getInstance("SHA-1"); md.reset(); md.update(input.getBytes("utf8")); String ouput = new BigInteger(1, md.digest()).toString(16);