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개
12년 전
양방향 암호화 함수면서
encode 는 있는데 decode 는 없는 슬픈 현실..
encode 는 있는데 decode 는 없는 슬픈 현실..
takumi22
12년 전
정보 감사합니다
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4035 | |
| 29 |
아우겐나이스
|
21년 전 | 4431 | |
| 28 |
아우겐나이스
|
21년 전 | 3454 | |
| 27 | 21년 전 | 5816 | ||
| 26 | 21년 전 | 3088 | ||
| 25 | 21년 전 | 6068 | ||
| 24 | 18년 전 | 3642 | ||
| 23 | 21년 전 | 3628 | ||
| 22 | 21년 전 | 4238 | ||
| 21 | 21년 전 | 3811 | ||
| 20 | 21년 전 | 4210 | ||
| 19 | 21년 전 | 6670 | ||
| 18 | 21년 전 | 4728 | ||
| 17 | 21년 전 | 6973 | ||
| 16 | 21년 전 | 4163 | ||
| 15 | 21년 전 | 2618 | ||
| 14 | 21년 전 | 4961 | ||
| 13 | 21년 전 | 3393 | ||
| 12 |
Recluse
|
21년 전 | 3865 | |
| 11 |
아우겐나이스
|
21년 전 | 3560 | |
| 10 |
Recluse
|
21년 전 | 3387 | |
| 9 | 21년 전 | 3969 | ||
| 8 | 21년 전 | 5154 | ||
| 7 | 21년 전 | 4753 | ||
| 6 | 21년 전 | 5667 | ||
| 5 | 21년 전 | 4104 | ||
| 4 | 21년 전 | 4824 | ||
| 3 | 21년 전 | 4733 | ||
| 2 | 21년 전 | 3231 | ||
| 1 | 22년 전 | 4333 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기