Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 안드로이드 gcm
- 안드로이드 푸쉬
- 안드로이드
- soundpool
- chart.js
- C# IO
- roundcube
- curl
- android 효과음
- 자바스크립트
- 자동 생성
- 설치
- xe
- mysql
- html5
- dovecot
- php 취약점
- Android
- UML
- 안드로이드 푸시
- PHP
- FCM
- php 시큐어코딩
- C#
- 폼메일
- 우분투
- not working
- javascript
- WebView
- Mail Server
Archives
- Today
- Total
그러냐
php md5() 함수와 동일한 기능의 C#함수 본문
반응형
public static string MD5(string password) {
byte[] textBytes = System.Text.Encoding.Default.GetBytes(password);
try {
System.Security.Cryptography.MD5CryptoServiceProvider cryptHandler;
cryptHandler = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] hash = cryptHandler.ComputeHash (textBytes);
string ret = "";
foreach (byte a in hash) {
if (a<16)
ret += "0" + a.ToString ("x");
else
ret += a.ToString ("x");
}
return ret ;
}
catch {
throw;
}
}
출처 : http://www.spiration.co.uk/post/1203/MD5-in-C%23---works-like-php-md5()-example
반응형
'c#' 카테고리의 다른 글
c# 이미지 반투명 (0) | 2016.01.28 |
---|---|
이미지 회전 (0) | 2016.01.28 |
델리게이트(delegate) 활용_2 (0) | 2016.01.28 |
델리게이트(delegate) 활용_1 (0) | 2016.01.28 |
C# 2.0의 새로운 기능들 (0) | 2016.01.28 |