CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - exception
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - exception - List
[
Crack Hack
]
JavaSecurity
DL : 0
java 安全相关 包括 base64,MD5 RSA 等-Java Security and MD5 RSA Base64 DH,DESA just a jar
Date
: 2026-01-03
Size
: 44kb
User
:
魏铮铮
[
Crack Hack
]
MD5
DL : 0
public static String MD5(String inStr) { MessageDigest md5 = null; try { md5 = MessageDigest.getInstance("MD5"); } catch (Exception e) { System.out.println(e.toString()); e.printStackTrace(); return ""; } char[] charArray = inStr.toCharArray(); byte[] byteArray = new byte[charArray.length]; for (int i = 0; i < charArray.length; i++) byteArray[i] = (byte) charArray[i]; byte[] md5Bytes = md5.digest(byteArray); StringBuffer hexValue = new StringBuffer(); for (int i = 0; i < md5Bytes.length; i++) { int val = ((int) md5Bytes[i]) & 0xff; if (val < 16) hexValue.append("0"); hexValue.append(Integer.toHexString(val)); } return hexValue.toString(); }
Date
: 2026-01-03
Size
: 1kb
User
:
少郎
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.