이거 2006년도에 수업들으면서 김락현 교수님이 보라고 주신 소스.
그러나...대략 자바 ㅈㅈ
이거 2006년도에 수업들으면서 김락현 교수님이 보라고 주신 소스.
그러나...대략 자바 ㅈㅈ
import java.security.*;
public class test_MD5Encrypt{
public static void main(String args[]){
String str = "string";
System.out.println(encryptString(str));
}
public static String encryptString(String str) {
StringBuffer sb = new StringBuffer();
int i;
try{
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(str.getBytes());
byte[] md5Bytes = md5.digest();
for( i = 0 ; i < md5Bytes.length ; i++){
sb.append(md5Bytes[i]);
}
} catch (Exception e) {
}
return sb.toString();
}
}
![]() 그냥 이것저것 끄적끄적... by Nvdark |
||
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |