function EnCode($sText, $sCode) {
$cntData = strlen($sText) - 1;
$cntCode = strlen($sCode) - 1;
$arrData = array();
$arrCode = array();
for($i = 0;$cntData >= $i; $i++)
$arrData[$i] = $sText[$i];
for($i = 0;$cntCode >= $i; $i++)
$arrCode[$i] = $sCode[$i];
$flag = 0;
$strResult = "";
for($i = 0;$cntData >= $i; $i++) {
$strResult = $strResult . (ord($arrData[$i]) ^ ord($arrCode[$flag])) . chr(8);
if($flag == $cntCode)
$flag = 0;
else
$flag++;
}
return base64_encode($strResult);
}
$testKey = "asdjhhjksa";
$decodingData = EnCode($pw, $testKey);
댓글 2개
게시글 목록
| 번호 | 제목 |
|---|---|
| 10624 |
jQuery
Easing Functions Cheat Sheet
|
| 10618 | |
| 10614 | |
| 10607 |
jQuery
좌우 슬라이드메뉴와 상하 슬라이드 메뉴
6
|
| 10606 | |
| 10603 | |
| 10599 | |
| 20077 | |
| 10598 | |
| 10597 | |
| 10595 | |
| 10593 | |
| 10591 |
Mobile
모바일 웹 개발에 큰 도움이 되는 피모 브라우저
1
|
| 10590 |
PHP
간단한 쿠폰번호 생성
|
| 10588 |
PHP
xml 파싱 예제
1
|
| 10586 |
PHP
eval
1
|
| 17645 |
제안서
제안서 유용한 도형
13
|
| 10585 |
jQuery
롤오버+슬라이드 질문드립니다.
|
| 10584 |
jQuery
jQuery path plugin
|
| 10580 |
JavaScript
아이폰일때 상단 검색바 숨기기
3
|
| 20070 | |
| 10579 | |
| 10578 | |
| 10574 | |
| 10573 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기